forked from raywo/MMM-PublicTransportHafas
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patheslint.config.mjs
More file actions
56 lines (55 loc) · 2.46 KB
/
Copy patheslint.config.mjs
File metadata and controls
56 lines (55 loc) · 2.46 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
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 json from "@eslint/json";
import markdown from "@eslint/markdown";
import packageJson from "eslint-plugin-package-json";
import stylistic from "@stylistic/eslint-plugin";
export default defineConfig([
{files: ["**/*.css"], languageOptions: {tolerant: true}, plugins: {css}, language: "css/css", extends: ["css/recommended"], rules: {"css/use-baseline": ["error", {available: "newly"}]}},
{
files: ["**/*.js", "**/*.mjs"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node
}
},
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/multiline-comment-style": "off",
"@stylistic/no-multi-spaces": ["error", {ignoreEOLComments: true}],
"@stylistic/object-property-newline": ["error", {allowAllPropertiesOnSameLine: true}],
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quote-props": ["error", "as-needed"],
"capitalized-comments": "off",
"default-case": "off",
"func-style": "off",
"import-x/no-unresolved": ["error", {ignore: ["eslint/config", "node_helper", "logger"]}],
"init-declarations": "off",
"max-lines": ["warn", 500],
"max-lines-per-function": ["warn", 100],
"max-params": ["warn", 4],
"max-statements": ["error", 25],
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-ternary": "off",
"one-var": ["error", "never"],
"prefer-destructuring": "off",
"sort-keys": "off",
strict: "off"
}
},
{files: ["tests/**/*.mjs"], rules: {"no-undefined": "off", "max-lines": "off", "max-lines-per-function": "off"}},
{files: ["**/*.json"], ignores: ["package-lock.json"], plugins: {json}, extends: ["json/recommended"], language: "json/json"},
{files: ["package.json"], plugins: {packageJson}, extends: ["packageJson/recommended"]},
{files: ["**/*.md"], plugins: {markdown}, extends: ["markdown/recommended"], language: "markdown/gfm"}
]);