-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
97 lines (97 loc) · 4.36 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
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
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
},
overrides: [
{
files: ["*.tsx", "*.ts", "*.js", "*.jsx"],
extends: [ "@rushstack/eslint-config/profile/web-app", "plugin:react-hooks/recommended", "@rushstack/eslint-config/mixins/react"],
plugins: ["import", "prettier"],
rules: {
"@rushstack/typedef-var": "off",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"no-void": "off",
"promise/param-names": "off",
"import/no-unresolved": "off",
"import/named": "off",
"prettier/prettier": "error",
"import/default": "error",
"import/no-self-import": "error",
"import/export": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-deprecated": "warn",
"import/no-mutable-exports": "error",
"import/first": "error",
"no-unused-expressions": "off",
"react/jsx-no-bind": "off",
"import/order": [
"error",
{
"newlines-between": "always",
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"pathGroups": [
{
"pattern": "~**/**",
"group": "internal"
},
{
"pattern": "~*",
"group": "internal"
},
],
"alphabetize": {
"order": "asc"
}
}
],
"import/newline-after-import": "error",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/no-angle-bracket-type-assertion": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": ["error", {
"ts-expect-error": "allow-with-description",
"ts-ignore": "allow-with-description",
"ts-nocheck": "allow-with-description"
}],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
}
]
},
"settings": {
"import/extensions": [".ts", ".tsx"],
"import/ignore": ["node_modules"],
"import/internal-regex": "^@kx/",
"import/resolver": "typescript",
"import/external-module-folders": ["node_modules", "node_modules/@types"]
},
},
{
"files": ["*.spec.ts", "*.spec.tsx"],
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-var-requires ": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
}
},
]
}