-
Notifications
You must be signed in to change notification settings - Fork 10
/
eslint.config.mjs
71 lines (70 loc) · 1.67 KB
/
eslint.config.mjs
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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import parser from "@typescript-eslint/parser";
import pluginReact from "eslint-plugin-react";
import eslintPluginPrettier from "eslint-plugin-prettier";
import pluginCypress from "eslint-plugin-cypress/flat";
export default [
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
languageOptions: {
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
parser: parser,
globals: {
...globals.browser,
...globals.node,
React: "writable",
process: "readonly",
require: "readonly",
},
},
plugins: {
"@typescript-eslint": tseslint,
cypress: pluginCypress,
react: pluginReact,
prettier: eslintPluginPrettier,
},
rules: {
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [2, { extensions: [".jsx", ".tsx"] }],
"no-console": [
"error",
{
allow: ["error"],
},
],
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"prettier/prettier": "error",
"@typescript-eslint/no-explicit-any": "error",
},
settings: {
react: {
version: "detect",
},
},
},
{
ignores: [
".pnp.cjs",
"node_modules/**",
"dist/**",
"build/**",
".next/**",
".github/**",
".storybook/**",
".yarn/**",
"**/vendor/**",
],
},
pluginCypress.configs.recommended,
pluginJs.configs.recommended,
{
files: ["prettier.config.js"],
languageOptions: {
globals: globals.node,
},
},
];