Skip to content

Commit a3435a1

Browse files
committed
update lint
1 parent 82922e2 commit a3435a1

File tree

3 files changed

+1362
-7219
lines changed

3 files changed

+1362
-7219
lines changed

Diff for: .eslintrc.json

+1-146
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,3 @@
11
{
2-
"env": {
3-
"es2020": true,
4-
"browser": true
5-
},
6-
"parser": "@typescript-eslint/parser",
7-
"extends": [
8-
"react-app",
9-
"prettier",
10-
"standard",
11-
"plugin:unicorn/recommended",
12-
"plugin:@typescript-eslint/recommended",
13-
"plugin:@typescript-eslint/eslint-recommended",
14-
"plugin:import/errors",
15-
"plugin:import/warnings"
16-
],
17-
"settings": {
18-
"import/parsers": {
19-
"@typescript-eslint/parser": [".ts", ".tsx"]
20-
},
21-
"import/resolver": {
22-
"node": { "extensions": [".js", ".mjs", ".cjs"] },
23-
"typescript": {}
24-
}
25-
},
26-
"plugins": ["@typescript-eslint", "import"],
27-
"rules": {
28-
"react/react-in-jsx-scope": "off",
29-
"react/display-name": "off",
30-
"react/prop-types": "off",
31-
"react/jsx-key": "error",
32-
"no-console": 1,
33-
"no-unused-vars": "off",
34-
"@typescript-eslint/no-unused-vars": "error",
35-
"import/newline-after-import": "error",
36-
"import/no-duplicates": "error",
37-
// Enforce import order
38-
"import/order": [
39-
2,
40-
{
41-
"groups": ["builtin", "external", "internal"],
42-
"pathGroups": [
43-
{
44-
"pattern": "react",
45-
"group": "external",
46-
"position": "before"
47-
},
48-
{
49-
"pattern": "@+(symbols)",
50-
"group": "internal"
51-
},
52-
{
53-
"pattern": "@+(api|components|compositions|directives|enums|interfaces|layouts|modules|services|utils|views|hooks)/**",
54-
"group": "internal"
55-
},
56-
{
57-
"pattern": "@/**",
58-
"group": "internal"
59-
},
60-
{
61-
"pattern": "*.scss",
62-
"group": "index",
63-
"patternOptions": { "matchBase": true }
64-
}
65-
],
66-
"pathGroupsExcludedImportTypes": ["react"],
67-
"newlines-between": "always",
68-
"alphabetize": {
69-
"order": "asc",
70-
"caseInsensitive": true
71-
}
72-
}
73-
],
74-
// Imports should come first
75-
"import/first": "error",
76-
// Other import rules
77-
"import/no-mutable-exports": "error",
78-
// Allow unresolved imports
79-
"import/no-unresolved": "off",
80-
81-
"semi": 0,
82-
"quotes": 0,
83-
"indent": 0,
84-
"space-before-function-paren": 0,
85-
"arrow-parens": 0,
86-
"comma-dangle": 0,
87-
"keyword-spacing": 0,
88-
"no-multiple-empty-lines": 0,
89-
"no-trailing-spaces": 0,
90-
"unicorn/number-literal-case": 0,
91-
"unicorn/template-indent": 0,
92-
"generator-star-spacing": 0,
93-
"space-infix-ops": 0,
94-
"comma-spacing": 0,
95-
"brace-style": 0,
96-
"space-in-parens": 0,
97-
"space-before-blocks": 0,
98-
"semi-spacing": 0,
99-
"object-property-newline": 0,
100-
"no-multi-spaces": 0,
101-
"key-spacing": 0,
102-
"eol-last": 0,
103-
"func-call-spacing": 0,
104-
"comma-style": 0,
105-
106-
// Disable some unnecessary or conflicting rules
107-
"no-use-before-define": "off",
108-
"unicorn/prevent-abbreviations": 0,
109-
"unicorn/no-await-expression-member": 0,
110-
"unicorn/no-useless-undefined": 0,
111-
"unicorn/no-array-push-push": 0,
112-
"unicorn/filename-case": 0,
113-
"camelcase": 0,
114-
"@typescript-eslint/no-explicit-any": 0,
115-
"@typescript-eslint/no-empty-function": 0,
116-
"@typescript-eslint/no-var-requires": 0,
117-
"@typescript-eslint/ban-ts-comment": 0,
118-
"@typescript-eslint/no-empty-interface": 0,
119-
120-
// Prefer const over let
121-
"prefer-const": [
122-
"error",
123-
{
124-
"destructuring": "any",
125-
"ignoreReadBeforeAssign": false
126-
}
127-
],
128-
129-
// No single if in an "else" block
130-
"no-lonely-if": "error",
131-
132-
// Force curly braces for control flow,
133-
// including if blocks with a single statement
134-
"curly": ["error", "all"],
135-
136-
// No async function without await
137-
"require-await": "error",
138-
139-
// Force dot notation when possible
140-
"dot-notation": "error",
141-
142-
// Force object shorthand where possible
143-
"object-shorthand": "error",
144-
145-
// No useless destructuring/importing/exporting renames
146-
"no-useless-rename": "error"
147-
}
2+
"extends": ["react-app", "@hunghg255/eslint-config-react"]
1483
}

0 commit comments

Comments
 (0)