-
Notifications
You must be signed in to change notification settings - Fork 39
/
.eslintrc.js
38 lines (38 loc) · 1.12 KB
/
.eslintrc.js
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
module.exports = {
parserOptions: {
sourceType: "module",
},
extends: ["eslint:recommended", "plugin:prettier/recommended"],
overrides: [
{
files: ["*.ts"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "simple-import-sort"],
extends: ["plugin:@typescript-eslint/recommended"],
},
{
files: ["*.tsx"],
parser: "@typescript-eslint/parser",
plugins: ["react", "react-hooks", "@typescript-eslint/eslint-plugin", "simple-import-sort"],
extends: ["plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended"],
},
],
env: {
browser: true,
node: true,
commonjs: true,
es2021: true,
},
ignorePatterns: ["node_modules", "build", "dist", "coverage", "public"],
rules: {
"semi": "error",
"quote-props": ["error", "consistent-as-needed"],
"arrow-parens": ["error", "as-needed"],
"no-var": "error",
"prefer-const": "error",
"no-console": "off",
"@typescript-eslint/consistent-type-imports": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
},
};