forked from Automattic/wp-calypso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
37 lines (37 loc) · 971 Bytes
/
.eslintrc.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
30
31
32
33
34
35
36
37
module.exports = {
root: true,
'extends': [
'wpcalypso/react',
'plugin:jsx-a11y/recommended',
'plugin:jest/recommended',
],
parser: 'babel-eslint',
env: {
browser: true,
'jest/globals': true,
mocha: true,
node: true
},
globals: {
asyncRequire: true,
PROJECT_NAME: true,
COMMIT_SHA: true,
},
plugins: [
'jest',
'jsx-a11y',
],
rules: {
camelcase: 0, // REST API objects include underscores
'jest/valid-expect': 0,
'jsx-a11y/anchor-has-content': 0, // i18n-calypso translate triggers false failures
'max-len': [ 2, { code: 140 } ],
'no-restricted-imports': [ 2, 'lib/sites-list', 'lib/mixins/data-observe' ],
'no-restricted-modules': [ 2, 'lib/sites-list', 'lib/mixins/data-observe' ],
'no-unused-expressions': 0, // Allows Chai `expect` expressions
'wpcalypso/jsx-classname-namespace': [ 2, {
rootFiles: [ 'index.js', 'index.jsx', 'main.js', 'main.jsx' ],
} ],
'wpcalypso/import-no-redux-combine-reducers': 2
}
};