-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patheslint.config.js
52 lines (44 loc) · 1.26 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
// @ts-check
import globals from "globals"
import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import love from "eslint-config-love"
import nodePlugin from "eslint-plugin-n"
import pluginPromise from "eslint-plugin-promise"
import pluginSecurity from "eslint-plugin-security"
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"
export default tseslint.config(
{ files: ["**/*.{js,mjs,cjs,ts}"] },
{
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
globals: globals.node,
ecmaVersion: "latest",
sourceType: "module",
},
},
eslint.configs.recommended,
tseslint.configs.recommended,
{ ...love, files: ["**/*.js", "**/*.ts"] },
nodePlugin.configs["flat/recommended-script"],
pluginPromise.configs["flat/recommended"],
pluginSecurity.configs.recommended,
eslintPluginPrettierRecommended,
{
rules: {
"eslint-comments/require-description": "off",
"@typescript-eslint/no-magic-numbers": "off",
"n/no-missing-import": [
"error",
{
tryExtensions: [".ts", ".js", ".json"],
ignoreTypeImport: true,
},
],
},
}
)