This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
61 lines (60 loc) · 1.8 KB
/
eslint.config.mjs
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
import globals from "globals";
import html from "eslint-plugin-html";
import js from "@eslint/js";
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard';
import stylistic from '@stylistic/eslint-plugin';
export default [
{
files: ["**/*.js"],
languageOptions: {
globals: {
...globals.browser,
},
sourceType: "script",
},
},
{
files: ["**/*.html"],
plugins: { html },
settings: {
"html/indent": "4",
},
},
{
ignores: [
...resolveIgnoresFromGitignore(),
],
},
js.configs.recommended,
// stylistic.configs['recommended-flat'],
...neostandard(),
{
plugins: {
"@stylistic": stylistic,
},
rules: {
"camelcase": "off",
"eqeqeq": "off",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-labels": "warn", // TODO: Remove
"no-unused-vars": ["error", {
"args": "none",
"caughtErrors": "none",
}],
"object-shorthand": ["warn", "consistent"],
"yoda": "off",
"@stylistic/indent": ["warn", 4, { "SwitchCase": 1 }],
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/max-len": ["warn", 165],
"@stylistic/no-tabs": "off",
"@stylistic/quotes": ["off", "single", { "avoidEscape": true }],
"@stylistic/quote-props": ["warn", "consistent"],
"@stylistic/semi": ["warn", "always"],
"@stylistic/space-before-function-paren": ["warn", {
"anonymous": "always",
"asyncArrow": "always",
"named": "never",
}],
},
},
];