-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
29 lines (27 loc) · 1.03 KB
/
eslint.config.js
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
const { includeIgnoreFile } = require("@eslint/compat");
const stylistic = require("@stylistic/eslint-plugin");
const eslintPluginJsonc = require("eslint-plugin-jsonc");
const path = require("node:path");
const gitignorePath = path.resolve(__dirname, ".gitignore");
module.exports = [
includeIgnoreFile(gitignorePath),
...eslintPluginJsonc.configs["flat/recommended-with-json5"],
{
files: ["**/*.json5"],
plugins: { "@stylistic": stylistic },
...stylistic.configs["recommended-flat"],
rules: {
"jsonc/array-bracket-newline": ["error", "always"],
"jsonc/array-element-newline": "error",
"jsonc/comma-dangle": ["error", "always-multiline"],
"jsonc/comma-style": "error",
"jsonc/indent": ["error", 2],
"jsonc/key-spacing": "error",
"jsonc/no-irregular-whitespace": "error",
"jsonc/object-curly-newline": ["error", "always"],
"jsonc/object-property-newline": "error",
"jsonc/quotes": ["error", "double"],
"multiline-comment-style": ["error", "bare-block"],
},
},
];