forked from leemonade/leemons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
117 lines (114 loc) · 3.12 KB
/
.eslintrc.json
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
113
114
115
116
117
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"globals": {
"leemons": true
},
"extends": [
"eslint:recommended",
"standard",
"plugin:import/recommended",
"plugin:react/recommended",
// If using the new JSX transform from React 17
// https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:sonarjs/recommended-legacy",
// Should be the last one: https://github.com/prettier/eslint-config-prettier?tab=readme-ov-file#installation
"prettier"
],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"jsconfig": {
"config": "jsconfig.json"
}
}
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"babelOptions": {
"babelrc": false,
"configFile": false,
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-syntax-jsx", "@babel/plugin-proposal-export-default-from"]
},
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["sonarjs", "import", "unused-imports"],
"rules": {
"radix": "off",
"no-plusplus": "off",
"no-unused-vars": "warn",
"no-underscore-dangle": "off",
"import/no-deprecated": "warn",
"import/no-extraneous-dependencies": "off",
"import/no-mutable-exports": "error",
"import/no-named-as-default": "off",
"import/no-dynamic-require": "off",
"import/newline-after-import": ["error", { "count": 1, "considerComments": true }],
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": { "order": "asc", "orderImportKind": "asc", "caseInsensitive": false },
"pathGroups": [{ "pattern": "react*", "group": "builtin", "position": "before" }],
"pathGroupsExcludedImportTypes": []
}
],
"unused-imports/no-unused-imports": "error"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"project": [
"packages/*/tsconfig.json",
"plugins/*/*/tsconfig.json",
"private-plugins/*/*/tsconfig.json"
]
}
}
},
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["@typescript-eslint"]
},
{
"files": ["**/*.test.js", "**/*.test.ts"],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": ["private-plugins/*/tsconfig.spec.json"]
}
}
},
"rules": {
"no-unused-vars": "off",
"sonarjs/no-duplicate-string": "off"
}
}
]
}