-
Notifications
You must be signed in to change notification settings - Fork 10
/
.eslintrc
112 lines (112 loc) · 3.13 KB
/
.eslintrc
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
{
"env": {
"es2021": true,
"browser": true,
"jest": true
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": [
"packages/react-components/tsconfig.json"
]
}
}
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:eslint-comments/recommended",
"plugin:storybook/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"project": "tsconfig.json"
},
"plugins": ["@typescript-eslint", "import", "unused-imports", "eslint-plugin-react-compiler"],
"rules": {
"eslint-comments/no-unused-disable": "error",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"import/prefer-default-export": "off",
"import/no-named-as-default": "off",
"react-compiler/react-compiler": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"prefer-const": "error",
"@typescript-eslint/no-unsafe-member-access": "off", // TODO: enable when design-system-icons will have proper types
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-assignment": "off", // TODO: enable when design-system-icons will have proper types
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"no-console": "error",
"no-undef": "error",
"no-useless-escape": "error",
"no-param-reassign": "error",
"no-nested-ternary": "error",
"no-multi-assign": "error",
"no-invalid-this": "error",
"padding-line-between-statements": [
"warn",
{
"blankLine": "always",
"prev": ["const", "let", "var", "block", "block-like", "expression"],
"next": "return"
}
],
"object-curly-spacing": ["error", "always"],
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
"import/no-unresolved": "error",
"import/named": "off",
"import/no-cycle": "error",
"import/extensions": ["error", "never"],
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "./**.module.scss",
"group": "sibling",
"position": "after"
}
],
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}