Skip to content

Commit

Permalink
⬆️ Upgrade to eslint 5.0.1
Browse files Browse the repository at this point in the history
- Remove deprecated experimentalObjectRestSpread flag in favor of ecmaVersion 2018
- Disable new `max-classes-per-file` rule
- Disable new `max-lines-per-function` rule
- Enable new `prefer-object-spread` rule as a warning
  • Loading branch information
randycoulman committed Jul 14, 2018
1 parent a1f6e0b commit 31d931d
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 197 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ That way, the `prettier` configurations will override any `zeal` configurations

This plugin contains all of the rules available in:

- [ESLint](http://eslint.org/): 4.19.1
- [ESLint](http://eslint.org/): 5.0.1
- [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react): 7.10.0
- [eslint-plugin-react-native](https://github.com/intellicode/eslint-plugin-react-native): 3.2.1
- [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import): 2.13.0
Expand Down
11 changes: 7 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ module.exports = {
globals: {},
parser: "babel-eslint",
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true
},
ecmaVersion: 2017,
ecmaVersion: 2018,
sourceType: "module"
},
plugins: ["import"],
Expand Down Expand Up @@ -119,6 +116,8 @@ module.exports = {
eqeqeq: "warn",
// make sure for-in loops have an if statement
"guard-for-in": "warn",
// enforce a maximum number of classes per file
"max-classes-per-file": "off",
// disallow the use of alert, confirm, and prompt
"no-alert": "warn",
// disallow use of arguments.caller or arguments.callee
Expand Down Expand Up @@ -388,6 +387,8 @@ module.exports = {
"max-len": ["warn", 80, 2],
// enforce a maximum file length
"max-lines": "off",
// enforce a maximum function length
"max-lines-per-function": "off",
// specify the maximum depth callbacks can be nested
"max-nested-callbacks": ["warn", 3],
// limits the number of parameters that can be used in the function
Expand Down Expand Up @@ -489,6 +490,8 @@ module.exports = {
{ blankLine: "always", prev: "directive", next: "*" },
{ blankLine: "any", prev: "directive", next: "directive" }
],
// Prefer use of an object spread over Object.assign
"prefer-object-spread": "warn",
// require quotes around object literal property names
"quote-props": ["warn", "as-needed"],
// specify whether backticks, double or single quotes should be used
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
],
"devDependencies": {
"babel-eslint": "^8.2.5",
"eslint": "4.19.1",
"eslint": "5.0.1",
"eslint-config-prettier": "^2.9.0",
"eslint-find-rules": "^3.3.1",
"eslint-plugin-import": "2.13.0",
Expand All @@ -59,7 +59,7 @@
},
"peerDependencies": {
"babel-eslint": ">=8.2.2",
"eslint": ">=4.19.1",
"eslint": ">=5.0.1",
"eslint-plugin-import": ">=2.13.0"
},
"lint-staged": {
Expand Down
Loading

0 comments on commit 31d931d

Please sign in to comment.