-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.cjs
49 lines (49 loc) ยท 1.58 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"plugin:react/recommended", // ๋ฆฌ์กํธ ์ถ์ฒ ๋ฃฐ์
"eslint:recommended",
"plugin:@typescript-eslint/recommended", // ํ์
์คํฌ๋ฆฝํธ ์ถ์ฒ ๋ฃฐ์
"plugin:react-hooks/recommended",
"plugin:prettier/recommended", // eslint์ ํฌ๋งคํ
๊ธฐ๋ฅ์ prettier๋ก ์ฌ์ฉํจ. ํญ์ ๋ง์ง๋ง์ ์ธํ
๋์ด์ผ ํจ. (eslint-plugin-prettier)
],
ignorePatterns: ["dist", ".eslintrc.cjs", "mock"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh", "simple-import-sort"],
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"simple-import-sort/imports": [
"warn",
{
groups: [
// Packages `react` related packages come first.
["^react", "^@?\\w"],
// Internal packages.
["^(@|components)(/.*|$)"],
// Side effect imports.
["^\\u0000"],
// Parent imports. Put `..` last.
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Other relative imports. Put same-folder imports and `.` last.
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
// Style imports.
["^.+\\.?(css)$"],
],
},
],
"prettier/prettier": [
"warn",
{
endOfLine: "auto",
},
],
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/no-explicit-any": ["warn"],
},
parserOptions: {
sourceType: "module",
ecmaVersion: "latest",
},
};