-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patheslint.config.js
36 lines (35 loc) · 878 Bytes
/
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
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import jsdoc from "eslint-plugin-jsdoc";
import unicorn from "eslint-plugin-unicorn";
import globals from "globals";
export default [
js.configs.recommended,
jsdoc.configs["flat/recommended"],
unicorn.configs["flat/recommended"],
{
ignores: ["www/**"],
},
{
languageOptions: { globals: { ...globals.node } },
rules: {
"jsdoc/no-undefined-types": [1, { definedTypes: ["NodeJS"] }],
"unicorn/filename-case": [
"warn",
{
case: "kebabCase",
ignore: ["eleventyComputed.js"],
},
],
},
},
{
files: ["src/assets/**/*.js"],
languageOptions: { globals: { ...globals.browser } },
},
{
files: ["lib/serviceworker.js"],
languageOptions: { globals: { ...globals.serviceworker } },
},
prettier,
];