Skip to content

Commit

Permalink
Update to eslint 6
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnapo committed Jun 28, 2019
1 parent 0a6ffa1 commit c4adb1d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"jest": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2015
},
"extends": [
"airbnb",
"plugin:react/recommended",
Expand All @@ -19,7 +22,7 @@
"no-restricted-syntax": "off",
"no-await-in-loop": "off",
"prefer-destructuring": [ "error", { "object": true, "array": false } ],
"react/jsx-filename-extension": [ 1, { "extensions": [ ".js", ".jsx" ] } ],
"react/jsx-filename-extension": [ "error", { "extensions": [ ".js", ".jsx" ] } ],
"no-use-before-define": "off",
"no-param-reassign": "off",
"react/forbid-prop-types": "off",
Expand All @@ -29,7 +32,6 @@
"max-len": ["error", { "code": 150 }],
"class-methods-use-this": "off",
"no-return-assign": "off",
"function-paren-newline": "off",
"no-nested-ternary": "off",
"react/no-array-index-key": "off",
"object-curly-newline": "off"
Expand Down
3 changes: 0 additions & 3 deletions .npmignore

This file was deleted.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
},
"dependencies": {},
"devDependencies": {
"ava": "^1.4.1",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"ava": "^2.1.0",
"babel-eslint": "^10.0.2",
"eslint": "^6.0.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4"
"eslint-plugin-react": "^7.14.2"
},
"peerDependencies": {
"babel-eslint": ">=10.0.1",
"eslint": ">=5.16.0",
"babel-eslint": ">=10.0.2",
"eslint": ">=6.0.1",
"eslint-config-airbnb": ">=17.1.0",
"eslint-plugin-import": ">=2.17.3",
"eslint-plugin-import": ">=2.18.0",
"eslint-plugin-jsx-a11y": ">=6.2.1",
"eslint-plugin-react": ">=7.13.0"
"eslint-plugin-react": ">=7.14.2"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions test/config.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const test = require('ava');
const eslint = require('eslint');

test('load config in eslint to validate all rule syntax is correct', (t) => {
const { CLIEngine } = eslint;
const { CLIEngine } = require('eslint');
const cli = new CLIEngine({ useEslintrc: false, configFile: '.eslintrc.json' });
const code = 'const foo = 1;\nconst bar = () => {};\nbar(foo);\n';
t.is(cli.executeOnText(code).errorCount, 0);
Expand Down

0 comments on commit c4adb1d

Please sign in to comment.