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
|
{
"extends": ["airbnb", "prettier", "plugin:node/recommended", "plugin:import/react"],
"plugins": ["prettier", "import", "@typescript-eslint"],
"ignorePatterns": ["solr-8.3.1/*", "deploy/*"], // <<< ignore all files in test folder
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
},
"node": {
"extensions": [".js", ".ts", ".tsx"]
}
},
"import/extensions": [".js", ".jsx", ".ts", ".tsx"]
},
"rules": {
"import/extensions": [
"warn",
"ignorePackages",
{
"": "never",
"js": "never",
"ts": "never",
"tsx": "never"
}
],
"node/no-missing-import": 0,
"prettier/prettier": "error",
"no-console": "off",
"func-names": "off",
"no-process-exit": "off",
"object-shorthand": "off",
"class-methods-use-this": "off",
"single-quote": "off",
"max-classes-per-file": 0,
"node/no-unsupported-features/es-syntax": ["error", { "ignores": ["modules"] }],
"react/jsx-filename-extension": [2, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"import/prefer-default-export": "off",
"no-unused-expressions": "warn",
"@typescript-eslint/no-unused-expressions": "warn",
"prefer-template": "off",
"no-inner-declarations": "off",
"no-plusplus": "off",
"no-multi-assign": "off",
"no-underscore-dangle": "off",
"no-nested-ternary": "off",
"lines-between-class-members": "off",
"no-explicit-any": "on",
// Note: you must disable the base rule as it can report incorrect errors
"no-shadow": "off",
"@typescript-eslint/no-shadow": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-namespace": 0,
"react/destructuring-assignment": 0,
"no-restricted-globals": ["error", "event"],
"no-param-reassign": ["error", { "props": false }],
// "import/no-cycle": 0,
"no-alert": 0,
"radix": "off"
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"no-undef": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"useJSXTextNode": false
}
}
|