-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.eslintrc
More file actions
119 lines (119 loc) · 3.28 KB
/
.eslintrc
File metadata and controls
119 lines (119 loc) · 3.28 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"airbnb",
"airbnb/hooks"
],
"globals": {
"JSX": true
},
"env": {
"browser": true,
"node": true,
"es2021": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx", ".d.ts"]
}
}
},
"ignorePatterns": [
"dist/**/*",
"src/lib/**/*"
],
"rules": {
"arrow-parens": ["error", "as-needed"],
"arrow-body-style": "off",
"semi": ["error", "never"],
"semi-style": "off",
"no-alert": "error",
"no-console": "error",
"comma-dangle": ["error", "never"],
"operator-linebreak": "off",
"class-methods-use-this": "off",
"implicit-arrow-linebreak": "off",
"object-curly-newline": "off",
"no-plusplus": "off",
"func-names": "off",
"no-param-reassign": ["error", { "props": false }],
// Disabled to let TypeScript handle unused variable checking.
// ESLint would report unused variables in a type's
// function callback declaration
"no-unused-vars": "off",
// Disabled to allow types to be defined at the end of a file
"no-use-before-define": "off",
"import/extensions": ["error", "never"],
"react-hooks/exhaustive-deps": "off",
"react/no-array-index-key": "off",
"react/jsx-props-no-spreading": "off",
"react/destructuring-assignment": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-curly-newline": "off",
"react/jsx-filename-extension": [
"error",
{ "extensions": [".jsx", ".tsx"] }
],
"react/jsx-curly-spacing": [
"error",
{
"when": "never",
"children": {
"when": "never"
}
}
],
// Media will only ever be included through the GitHub API so
// it's not possible to provide a <track> element to media tags
"jsx-a11y/media-has-caption": "off",
// TODO: Possibly enable these for accessability?
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/no-static-element-interactions": "off",
"react/prop-types": "off",
"lines-between-class-members": "off",
"react/static-property-placement": "off",
"react/require-default-props": [
"error",
{
"ignoreFunctionalComponents": true
}
],
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "after-used" }]
},
"overrides": [
{
"files": ["*.d.ts"],
"globals": {
"React": true
}
},
{
"files": ["src/__tests__/**/*", "src/__mocks__/**/*"],
"rules": {
"import/extensions": "off",
"import/no-unresolved": "off",
"global-require": "off",
"prefer-promise-reject-errors": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off"
}
}
]
}