-
-
Notifications
You must be signed in to change notification settings - Fork 336
/
Copy pathindex.js
29 lines (28 loc) · 1.02 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const eqeqeqRule = require('./eqeqeq-rule');
const noExtraParensRule = require('./no-extra-parens-rule');
module.exports = {
rules: {
eqeqeq: eqeqeqRule,
'no-extra-parens': noExtraParensRule,
},
configs: {
recommended: {
plugins: [
'@internal/eslint-plugin',
],
rules: {
// fixes only variable == (or !=) literal expression
'@internal/eqeqeq': ['error', 'always'],
// https://github.com/eslint/eslint/issues/16626
// https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L66
'@internal/no-extra-parens': ['error', 'all', {
conditionalAssign: true,
enforceForArrowConditionals: false,
ignoreJSX: 'all',
nestedBinaryExpressions: false,
returnAssign: false,
}],
},
},
},
};