10000 [eslint config] [base] [deps] [minor] add new disabled rules, update … · odongohcoder2019/javascript@b5954c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5954c3

Browse files
committed
[eslint config] [base] [deps] [minor] add new disabled rules, update eslint
1 parent 370793b commit b5954c3

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

packages/eslint-config-airbnb-base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@
5757
"babel-preset-airbnb": "^4.1.0",
5858
"babel-tape-runner": "^3.0.0",
5959
"eclint": "^2.8.1",
60-
"eslint": "^5.16.0 || ^6.1.0",
60+
"eslint": "^5.16.0 || ^6.7.2",
6161
"eslint-find-rules": "^3.4.0",
6262
"eslint-plugin-import": "^2.18.2",
6363
"in-publish": "^2.0.0",
6464
"safe-publish-latest": "^1.1.3",
6565
"tape": "^4.11.0"
6666
},
6767
"peerDependencies": {
68-
"eslint": "^5.16.0 || ^6.1.0",
68+
"eslint": "^5.16.0 || ^6.7.2",
6969
"eslint-plugin-import": "^2.18.2"
7070
},
7171
"engines": {

packages/eslint-config-airbnb-base/rules/best-practices.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ module.exports = {
4343
// https://eslint.org/docs/rules/eqeqeq
4444
eqeqeq: ['error', 'always', { null: 'ignore' }],
4545

46+
// Require grouped accessor pairs in object literals and classes
47+
// https://eslint.org/docs/rules/grouped-accessor-pairs
48+
// TODO: enable in next major, altho the guide forbids getters/setters anyways
49+
'grouped-accessor-pairs': 'off',
50+
4651
// make sure for-in loops have an if statement
4752
'guard-for-in': 'error',
4853

@@ -60,6 +65,11 @@ module.exports = {
6065
// https://eslint.org/docs/rules/no-case-declarations.html
6166
'no-case-declarations': 'error',
6267

68+
// Disallow returning value in constructor
69+
// https://eslint.org/docs/rules/no-constructor-return
70+
// TODO: enable, semver-major
71+
'no-constructor-return': 'off',
72+
6373
// disallow division operators explicitly at beginning of regular expression
6474
// https://eslint.org/docs/rules/no-div-regex
6575
'no-div-regex': 'off',

packages/eslint-config-airbnb-base/rules/errors.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ module.exports = {
3838
// disallow duplicate arguments in functions
3939
'no-dupe-args': 'error',
4040

41+
// Disallow duplicate conditions in if-else-if chains
42+
// https://eslint.org/docs/rules/no-dupe-else-if
43+
// TODO: enable, semver-major
44+
'no-dupe-else-if': 'off',
45+
4146
// disallow duplicate keys when creating object literals
4247
'no-dupe-keys': 'error',
4348

@@ -100,6 +105,11 @@ module.exports = {
100105
// disallow multiple spaces in a regular expression literal
101106
'no-regex-spaces': 'error',
102107

108+
// Disallow returning values from setters
109+
// https://eslint.org/docs/rules/no-setter-return
110+
// TODO: enable, semver-major (altho the guide forbids getters/setters already)
111+
'no-setter-return': 'off',
112+
103113
// disallow sparse arrays
104114
'no-sparse-arrays': 'error',
105115

packages/eslint-config-airbnb-base/rules/style.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@ module.exports = {
434434
// https://eslint.org/docs/rules/padding-line-between-statements
435435
'padding-line-between-statements': 'off',
436436

437+
// Disallow the use of Math.pow in favor of the ** operator
438+
// https://eslint.org/docs/rules/prefer-exponentiation-operator
439+
// TODO: enable, semver-major when eslint 5 is dropped
440+
'prefer-exponentiation-operator': 'off',
441+
437442
// Prefer use of an object spread over Object.assign
438443
// https://eslint.org/docs/rules/prefer-object-spread
439444
'prefer-object-spread': 'error',

packages/eslint-config-airbnb/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"babel-preset-airbnb": "^4.1.0",
6464
"babel-tape-runner": "^3.0.0",
6565
"eclint": "^2.8.1",
66-
"eslint": "^5.16.0 || ^6.1.0",
66+
"eslint": "^5.16.0 || ^6.7.2",
6767
"eslint-find-rules": "^3.4.0",
6868
"eslint-plugin-import": "^2.18.2",
6969
"eslint-plugin-jsx-a11y": "^6.2.3",
@@ -75,7 +75,7 @@
7575
"tape": "^4.11.0"
7676
},
7777
"peerDependencies": {
78-
"eslint": "^5.16.0 || ^6.1.0",
78+
"eslint": "^5.16.0 || ^6.7.2",
7979
"eslint-plugin-import": "^2.18.2",
8080
"eslint-plugin-jsx-a11y": "^6.2.3",
8181
"eslint-plugin-react": "^7.15.1",

0 commit comments

Comments
 (0)
0