-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
55 lines (55 loc) · 1.78 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
module.exports = {
extends: [
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:testing-library/react',
'@mll-lab/eslint-config/react',
'@mll-lab/eslint-config',
'plugin:@mll-lab/recommended',
'plugin:storybook/recommended',
],
plugins: ['jsx-a11y', 'testing-library'],
ignorePatterns: ['dist', '!.storybook'],
env: {
jest: true,
browser: true,
node: true,
es6: true,
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: ['./tsconfig.eslint.json'],
},
rules: {
'jsx-a11y/aria-props': 'error',
'jsx-a11y/control-has-associated-label': 'off',
'jsx-a11y/heading-has-content': 'off',
'jsx-a11y/label-has-associated-control': [
'error',
{
// NOTE: If this error triggers, either disable it or add
// your custom components, labels and attributes via these options
// See https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md
controlComponents: ['Input'],
},
],
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/mouse-events-have-key-events': 'error',
'jsx-a11y/role-has-required-aria-props': 'error',
'jsx-a11y/role-supports-aria-props': 'error',
'react/function-component-definition': 'off', // Incompatible with stories
'@typescript-eslint/no-unsafe-assignment': 'off', // TODO reenable and get rid of any
'@typescript-eslint/no-unsafe-call': 'off', // TODO reenable and get rid of any
'@typescript-eslint/no-unsafe-member-access': 'off', // TODO reenable and get rid of any
'@typescript-eslint/no-unsafe-return': 'off', // TODO reenable and get rid of any
},
settings: {
react: {
version: '16.13',
},
},
};