-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy patheslint.config.mjs
More file actions
48 lines (47 loc) · 1.79 KB
/
eslint.config.mjs
File metadata and controls
48 lines (47 loc) · 1.79 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
import css from "@eslint/css";
import {defineConfig} from "eslint/config";
import globals from "globals";
import {flatConfigs as importX} from "eslint-plugin-import-x";
import js from "@eslint/js";
import markdown from "@eslint/markdown";
import stylistic from "@stylistic/eslint-plugin";
export default defineConfig([
{files: ["**/*.css"], plugins: {css}, language: "css/css", extends: ["css/recommended"], rules: {"css/no-important": "off", "css/use-baseline": "off"}},
{
files: ["**/*.{js,mjs}"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node,
Log: "readonly",
Module: "readonly"
}
},
extends: [importX.recommended, js.configs.all, stylistic.configs.all],
rules: {
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/indent": ["error", 2],
"@stylistic/lines-around-comment": "off",
"@stylistic/object-property-newline": ["error", {allowAllPropertiesOnSameLine: true}],
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quote-props": ["error", "as-needed"],
"capitalized-comments": "off",
"consistent-this": "off",
"id-length": "off",
"init-declarations": "off",
"max-lines-per-function": ["warn", 500],
"max-statements": ["warn", 200],
"no-inline-comments": "off",
"no-invalid-this": "off",
"no-magic-numbers": "off",
"no-ternary": "off",
"no-undefined": "off",
"one-var": ["error", "never"],
"sort-keys": "off"
}
},
{files: ["**/*.md"], plugins: {markdown}, language: "markdown/gfm", extends: ["markdown/recommended"]}
]);