forked from bbc/simorgh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
50 lines (49 loc) · 1.18 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
const { eslintDirAlias } = require('./dirAlias');
module.exports = {
extends: [
'airbnb',
'plugin:prettier/recommended',
'plugin:jsx-a11y/recommended',
'plugin:cypress/recommended',
],
env: {
es6: true,
browser: true,
jest: true,
node: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['prettier', 'json', 'jsx-a11y', 'react-hooks', 'cypress'],
rules: {
'react/forbid-foreign-prop-types': 'error',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'linebreak-style': process.platform === 'win32' ? 'off' : ['error', 'unix'],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'import/no-extraneous-dependencies': [
'off',
{
devDependencies: [
'/.storybook/**',
'**/stories.jsx',
'/src/testHelpers/**',
],
},
],
'import/extensions': [1, { json: 'ignorePackages' }],
'jsx-a11y/no-redundant-roles': 'off',
},
settings: {
'import/resolver': {
alias: eslintDirAlias,
},
},
};