-
-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy patheslint.config.mjs
More file actions
58 lines (57 loc) · 1.79 KB
/
Copy patheslint.config.mjs
File metadata and controls
58 lines (57 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
49
50
51
52
53
54
55
56
57
58
import css from "@eslint/css"
import { defineConfig, globalIgnores } from "eslint/config"
import globals from "globals"
import js from "@eslint/js"
import markdown from "@eslint/markdown"
import stylistic from "@stylistic/eslint-plugin"
export default defineConfig([
globalIgnores(["CX3_Shared/**"]),
{
files: ["**/*.css"],
languageOptions: { tolerant: true },
plugins: { css },
language: "css/css",
extends: ["css/recommended"],
rules: {
"css/no-invalid-properties": "off",
"css/no-empty-blocks": "off",
"css/use-baseline": "off"
}
},
{
files: ["**/*.js", "**/*.mjs"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node
}
},
plugins: { js },
extends: ["js/recommended", stylistic.configs.recommended],
rules: {
"@stylistic/indent": ["error", 2],
"@stylistic/quotes": ["error", "double"],
"@stylistic/semi": ["error", "never"],
"@stylistic/comma-dangle": ["error", "never"],
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/array-bracket-spacing": ["error", "never"],
"@stylistic/brace-style": ["error", "1tbs", { allowSingleLine: true }],
"@stylistic/arrow-parens": ["error", "as-needed"],
"@stylistic/max-statements-per-line": ["error", { max: 2 }],
"@stylistic/multiline-comment-style": "off",
"@stylistic/padded-blocks": ["error", "never"],
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"no-console": "off",
"prefer-const": "warn",
"no-var": "error"
}
},
{ files: ["demo.config.js"], rules: { "prefer-const": "off" } },
{
files: ["**/*.md"],
plugins: { markdown },
language: "markdown/gfm",
extends: ["markdown/recommended"]
}
])