-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (59 loc) · 1.57 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
59
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
node: true,
},
parser: '@typescript-eslint/parser',
plugins: ["@typescript-eslint"],
extends: [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"prettier"
],
globals: {
"JSX": true
},
ignorePatterns: [
'**/*.test.ts',
'**/*.test.tsx',
'**/*.stories.tsx',
'**/*.stories.mdx',
'**/*.d.ts',
'**/*.d.tsx',
'**/types.ts'
],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
'import/no-extraneous-dependencies': 0,
'node/no-extraneous-import': 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".tsx", ".ts"] }],
'react/prop-types': 0,
"no-unused-vars": 1,
},
overrides: [
{
// enable the rule specifically for TypeScript files
"files": ["*.ts", "*.tsx"],
"rules": {
'@typescript-eslint/explicit-function-return-type': [
1,
{
allowExpressions: true,
allowHigherOrderFunctions: true,
allowTypedFunctionExpressions: true,
},
],
}
}
],
settings: {
react: {
version: 'detect',
},
},
};