forked from MarcLandis/MMM-Buttons
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
38 lines (37 loc) · 1.52 KB
/
eslint.config.mjs
File metadata and controls
38 lines (37 loc) · 1.52 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
import {defineConfig} 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([
{
files: ["**/*.js", "**/*.mjs"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node,
Log: "readonly",
Module: "readonly"
}
},
extends: [js.configs.all, stylistic.configs.all],
rules: {
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/newline-per-chained-call": ["error", {ignoreChainWithDepth: 3}],
"@stylistic/indent": ["error", 4],
"@stylistic/lines-around-comment": ["error", {beforeBlockComment: false}],
"@stylistic/object-property-newline": ["error", {allowAllPropertiesOnSameLine: true}],
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quote-props": ["error", "as-needed"],
"capitalized-comments": "off",
"max-statements": ["error", 20],
"no-magic-numbers": "off",
"no-ternary": "off",
"one-var": ["error", "never"],
"sort-keys": "off"
}
},
{files: ["**/*.md"], plugins: {markdown}, language: "markdown/gfm", extends: ["markdown/recommended"]}
]);