-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
45 lines (45 loc) · 1.29 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
39
40
41
42
43
44
45
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["next", "next/core-web-vitals", "plugin:prettier/recommended"],
plugins: ["unused-imports"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
rules: {
"react/jsx-curly-brace-presence": ["error", { props: "never", children: "never" }],
"react/self-closing-comp": ["error", { component: true, html: true }],
"@typescript-eslint/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
},
],
"unused-imports/no-unused-imports": "error",
},
overrides: [
{
files: ["*.ts", "*.tsx"],
extends: ["plugin:@typescript-eslint/recommended"],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
rules: {
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
// TODO: enable this once prettier supports it
// fixStyle: "inline-type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
},
},
],
};