Skip to content

Commit b8cdb2d

Browse files
committed
update lint
1 parent cc840c9 commit b8cdb2d

File tree

4 files changed

+42
-22
lines changed

4 files changed

+42
-22
lines changed

.eslintrc.json

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"env": {
3+
"es2020": true,
4+
"browser": true
5+
},
26
"parser": "@typescript-eslint/parser",
37
"extends": [
48
"react-app",
@@ -19,7 +23,7 @@
1923
"typescript": {}
2024
}
2125
},
22-
"plugins": ["@typescript-eslint", "simple-import-sort", "import"],
26+
"plugins": ["@typescript-eslint", "import"],
2327
"rules": {
2428
"react/react-in-jsx-scope": "off",
2529
"react/display-name": "off",
@@ -28,12 +32,45 @@
2832
"no-console": 1,
2933
"no-unused-vars": "off",
3034
"@typescript-eslint/no-unused-vars": "error",
31-
"simple-import-sort/imports": "error",
32-
"simple-import-sort/exports": "error",
3335
"import/newline-after-import": "error",
3436
"import/no-duplicates": "error",
3537
// Enforce import order
36-
// "import/order": ["error"],
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+
],
3774
// Imports should come first
3875
"import/first": "error",
3976
// Other import rules

package-lock.json

Lines changed: 0 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"eslint-plugin-n": "^15.2.5",
3535
"eslint-plugin-node": "^11.1.0",
3636
"eslint-plugin-promise": "^6.0.1",
37-
"eslint-plugin-simple-import-sort": "^10.0.0",
3837
"eslint-plugin-unicorn": "^43.0.2",
3938
"husky": "^8.0.0",
4039
"lint-staged": "^13.1.0",

src/main.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import './index.css';
22

33
import React from 'react';
4+
45
import ReactDOM from 'react-dom/client';
56

67
import App from './App';

0 commit comments

Comments
 (0)