Skip to content

Commit

Permalink
[Dev Deps] update eslint, @babel/core, @babel/parser, `eslint-c…
Browse files Browse the repository at this point in the history
…onfig-airbnb-base`, `eslint-plugin-import`, `object.entries`, `object.fromentries`, `safe-publish-latest`; switch to `@babel/eslint-parser`
  • Loading branch information
ljharb committed Dec 28, 2021
1 parent b7fb11c commit 983247c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
15 changes: 14 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{
"root": true,

"extends": "airbnb-base",
"parser": "babel-eslint",

"parser": "@babel/eslint-parser",

"rules": {
"no-use-before-define": ["error", { "functions": false }],
},

"overrides": [
{
"files": "src/index.js",
"rules": {
"import/no-import-module-exports": 0,
},
},
],
}
15 changes: 7 additions & 8 deletions __tests__/src/elementType-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,15 @@ describe('elementType tests', () => {
assert.equal(actual, expected);
});

it('should return the correct type of the multiple custom object element given its node object',
() => {
const code = '<UX.Slider.Blue.Light />';
const node = getOpeningElement(code);
it('should return the correct type of the multiple custom object element given its node object', () => {
const code = '<UX.Slider.Blue.Light />';
const node = getOpeningElement(code);

const expected = 'UX.Slider.Blue.Light';
const actual = elementType(node);
const expected = 'UX.Slider.Blue.Light';
const actual = elementType(node);

assert.equal(actual, expected);
});
assert.equal(actual, expected);
});

it('should return this.Component when given its node object', () => {
const code = '<this.Component />';
Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"prebuild": "rimraf lib",
"build": "babel src --out-dir lib",
"prepublish": "not-in-publish || (safe-publish-latest && npm test && npm run build)",
"prepublishOnly": "safe-publish-latest && npm test && npm run build",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "npm run build",
"lint": "eslint .",
"pretest": "npm run lint",
Expand All @@ -16,29 +17,29 @@
"test:watch": "npm run tests-only -- --watch"
},
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/parser": "^7.15.6",
"@babel/core": "^7.16.5",
"@babel/eslint-parser": "^7.16.5",
"@babel/parser": "^7.16.6",
"aud": "^1.1.5",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.1.0",
"babel-jest": "^20.0.3",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-replace-object-assign": "^1.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babylon": "^6.18.0",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.24.2",
"eslint": "^8.5.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.3",
"flow-parser": "^0.126.1",
"in-publish": "^2.0.1",
"jest": "^20.0.4",
"jest-cli": "^20.0.4",
"object.entries": "^1.1.4",
"object.fromentries": "^2.0.4",
"object.entries": "^1.1.5",
"object.fromentries": "^2.0.5",
"rimraf": "^2.7.1",
"safe-publish-latest": "^1.1.4"
"safe-publish-latest": "^2.0.0"
},
"engines": {
"node": ">=4.0"
Expand Down

0 comments on commit 983247c

Please sign in to comment.