This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
81 lines (76 loc) · 1.93 KB
/
eslint.config.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { fixupPluginRules } from "@eslint/compat";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import vercelBrowser from "@vercel/style-guide/eslint/browser";
import vercelReact from "@vercel/style-guide/eslint/react";
import _import from "eslint-plugin-import";
import globals from "globals";
export default [
{
ignores: [
"**/eslint.config.mjs",
"**/plopfile.js",
"**/*.config.js",
"**/*.config.ts",
"**/*.config.cjs",
"**/*.config.mjs",
"node_modules/",
"**/vendor/",
"public/build/",
".storybook/",
"**/reports/",
],
},
{
plugins: {
browser: fixupPluginRules(vercelBrowser),
react: fixupPluginRules(vercelReact),
"@typescript-eslint": fixupPluginRules(typescriptEslint),
import: fixupPluginRules(_import),
},
linterOptions: {
reportUnusedDisableDirectives: true,
},
languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
React: "writable",
},
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",
parserOptions: {
project: true,
},
},
rules: {
"react/prop-types": "off",
"@typescript-eslint/unbound-method": "off",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
},
],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: {
attributes: false,
},
},
],
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
},
},
{
// Rules for Storybook
files: ["**/*.stories.*"],
rules: {
"react/react-in-jsx-scope": "off",
},
},
];