-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
47 lines (46 loc) · 1.11 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
const prettierOptions = require('./.prettierrc.js');
module.exports = {
root: true,
extends: ['airbnb', 'airbnb/hooks', '@react-native-community', 'prettier'],
plugins: ['prettier'],
rules: {
'prettier/prettier': ['error', prettierOptions],
'import/no-unresolved': 0,
'import/extensions': 0,
'no-param-reassign': ['error', { props: false }],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'jsx-a11y/label-has-associated-control': [
2,
{
labelComponents: ['label'],
labelAttributes: ['htmlFor'],
controlComponents: ['Input'],
depth: 3,
},
],
'react/jsx-filename-extension': [1, { extensions: ['.tsx', '.jsx'] }],
'react/jsx-props-no-spreading': [
2,
{
html: 'enforce',
custom: 'ignore',
explicitSpread: 'enforce',
},
],
},
overrides: [
{
files: ['**/*.ts?(x)'],
rules: { 'prettier/prettier': ['warn', prettierOptions] },
parser: '@typescript-eslint/parser',
},
],
env: {
'jest/globals': true,
},
};