Skip to content

Commit 731ac8c

Browse files
committed
update lint
1 parent eed6d20 commit 731ac8c

File tree

4 files changed

+1773
-7746
lines changed

4 files changed

+1773
-7746
lines changed

.eslintrc.json

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

0 commit comments

Comments
 (0)