-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
72 lines (72 loc) · 1.76 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2021,
ecmaFeatures: {
modules: true,
},
sourceType: "module",
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
"plugin:storybook/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
],
plugins: ["@typescript-eslint", "react", "i18next", "simple-import-sort", "@conarti/feature-sliced"],
settings: {
react: {
version: "detect",
},
"jsx-a11y": {
components: {
Button: "button",
},
},
},
rules: {
"@conarti/feature-sliced/layers-slices": [
"error",
{
ignorePatterns: ["entities/**/@x/**", "app/app-store", "app/app-router/*"],
},
],
"@conarti/feature-sliced/absolute-relative": "error",
"@conarti/feature-sliced/public-api": "error",
"simple-import-sort/imports": [
"warn",
{
groups: [
["^@?\\w"],
["^(app)(/.*|$)"],
["^(pages)(/.*|$)"],
["^(widgets)(/.*|$)"],
["^(features)(/.*|$)"],
["^(entities)(/.*|$)"],
["^(shared)(/.[^assets]|$)"],
["^(shared/assets)(/.*|$)"],
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
["^.+\\.s?css$"],
],
},
],
"simple-import-sort/exports": "warn",
"i18next/no-literal-string": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
},
globals: {
__IS_DEV__: true,
},
};