forked from Olog/phoebus-olog-web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
92 lines (91 loc) · 2.44 KB
/
eslint.config.js
File metadata and controls
92 lines (91 loc) · 2.44 KB
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
82
83
84
85
86
87
88
89
90
91
92
import { defineConfig } from "eslint/config";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import typescriptEslint from "typescript-eslint";
import cypress from "eslint-plugin-cypress";
import prettier from "eslint-config-prettier/flat";
import globals from "globals";
import js from "@eslint/js";
import importPlugin from "eslint-plugin-import";
export default defineConfig([
{
files: ["**/*.{js,jsx,ts,tsx}"],
extends: [
js.configs.recommended,
react.configs.flat.recommended,
react.configs.flat["jsx-runtime"],
reactHooks.configs["recommended-latest"],
importPlugin.flatConfigs.recommended,
typescriptEslint.configs.recommended,
cypress.configs.recommended,
prettier
],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node
}
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
alias: {
map: [
["src", "./src"],
["config", "./src/config"],
["components", "./src/components"],
["views", "./src/views"],
["hooks", "./src/hooks"],
["providers", "./src/providers"],
["features", "./src/features"],
["api", "./src/api"],
["lib", "./src/lib"],
["mocks", "./src/mocks"],
["stories", "./src/stories"],
["test-utils", "./src/test-utils"]
],
extensions: [".ts", ".tsx", ".js", ".jsx"]
}
},
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json"
}
},
rules: {
"react/prop-types": "off",
"import/order": [
"error",
{
groups: [
"external",
"index",
"sibling",
"parent",
"internal",
"builtin",
"object",
"type"
]
}
],
"import/no-duplicates": "error",
"no-console": [
"error",
{
allow: ["warn", "error", "info", "debug"]
}
],
"no-nested-ternary": "error",
"no-unused-expressions": "error",
"operator-assignment": ["error", "always"],
yoda: "error",
"react/jsx-boolean-value": "error",
curly: ["error", "all"]
}
}
]);