forked from mozilla/treeherder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
58 lines (58 loc) · 1.61 KB
/
.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
module.exports = {
root: true,
extends: [
'eslint-config-airbnb',
// We use Prettier instead of AirBnb for style-related rules (see .prettierrc.js).
process.env.NODE_ENV === 'development'
? // Disables the AirBnB style rules but does not enable Prettier
// (to reduce the amount of console noise when using `yarn start`).
'prettier'
: // The above plus enables the prettier rule.
'plugin:prettier/recommended',
// Disable React-related AirBnB style rules.
'prettier/react',
'plugin:jest/recommended',
'plugin:jest/style',
],
parser: 'babel-eslint',
settings: {
react: {
version: '16.6',
},
},
env: {
browser: true,
},
globals: {
page: true,
browser: true,
jestPuppeteer: true,
},
rules: {
'class-methods-use-this': 'off',
'consistent-return': 'off',
'default-case': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'no-alert': 'off',
'no-continue': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off',
'prefer-promise-reject-errors': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-fragments': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'import/extensions': 'off',
// Override AirBnB's config for this rule to make it more strict.
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
'import/order': [
'error',
{
'newlines-between': 'always',
},
],
},
};