forked from requestly/requestly-desktop-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
113 lines (97 loc) · 2.29 KB
/
eslint.config.js
File metadata and controls
113 lines (97 loc) · 2.29 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
const { defineConfig, globalIgnores } = require("eslint/config");
const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const js = require("@eslint/js");
const { FlatCompat } = require("@eslint/eslintrc");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
module.exports = defineConfig([
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
ecmaVersion: 2022,
sourceType: "module",
parserOptions: {},
},
extends: compat.extends("eslint:recommended"),
rules: {},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
moduleDirectory: ["node_modules", "./src/"],
},
webpack: {
config: require.resolve("./.erb/configs/webpack.config.eslint.ts"),
},
typescript: {},
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
},
},
{
files: ["**/*.ts", "**/*.tsx"],
extends: compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
),
languageOptions: {
parser: tsParser,
ecmaVersion: 2020,
sourceType: "module",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
},
plugins: {
"@typescript-eslint": typescriptEslint,
},
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
},
},
{
files: ["**/*.js", "**/*.jsx"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
parserOptions: {},
},
},
globalIgnores([
"**/logs",
"**/*.log",
"**/pids",
"**/*.pid",
"**/*.seed",
"**/coverage",
"**/.eslintcache",
"**/node_modules",
"**/.DS_Store",
"release/app/dist",
"release/build",
".erb/dll",
"**/.idea",
"**/npm-debug.log.*",
"**/*.css.d.ts",
"**/*.sass.d.ts",
"**/*.scss.d.ts",
]),
]);