-
-
Notifications
You must be signed in to change notification settings - Fork 574
Expand file tree
/
Copy patheslint.config.js
More file actions
52 lines (49 loc) · 1.03 KB
/
eslint.config.js
File metadata and controls
52 lines (49 loc) · 1.03 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
import globals from "globals";
import pluginJs from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
import prettier from "eslint-config-prettier";
export const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
export const GLOB_TESTS = [
`**/test/**/*.${GLOB_SRC_EXT}`,
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
`**/*.spec.${GLOB_SRC_EXT}`,
`**/*.test.${GLOB_SRC_EXT}`,
`**/*.bench.${GLOB_SRC_EXT}`,
`**/*.benchmark.${GLOB_SRC_EXT}`,
];
export default [
{
name: "11ty/setup/js",
...pluginJs.configs.recommended,
},
{
name: "11ty/rules/project-specific",
plugins: {
"@stylistic/js": stylistic,
},
languageOptions: {
globals: {
...globals.node,
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"no-async-promise-executor": "warn",
"no-prototype-builtins": "warn",
"no-unused-vars": "warn",
"@stylistic/js/space-unary-ops": "error",
},
},
{
name: "11ty/ignores",
files: GLOB_TESTS,
rules: {
"no-unused-vars": "off",
},
},
{
name: "11ty/setup/prettier",
...prettier,
},
];