-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mts
More file actions
48 lines (47 loc) · 2.15 KB
/
eslint.config.mts
File metadata and controls
48 lines (47 loc) · 2.15 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 js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig, globalIgnores } from "eslint/config";
import stylistic from '@stylistic/eslint-plugin'
export default defineConfig([
globalIgnores([
"./dist"
]),
js.configs.recommended,
...tseslint.configs.recommended,
{ files: ["src/**/*.{js,mjs,cjs,ts,mts,cts}"], languageOptions: { globals: globals.browser }},
{
files: ["src/**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { stylistic },
rules: {
"stylistic/array-bracket-newline": "error",
"stylistic/array-bracket-spacing": "error",
"stylistic/arrow-parens": "error",
"stylistic/arrow-spacing": "error",
"stylistic/block-spacing": "error",
"stylistic/comma-dangle": "error",
"stylistic/comma-spacing": "error",
"stylistic/comma-style": "error",
"stylistic/computed-property-spacing": "error",
"stylistic/function-call-spacing": "error",
"stylistic/implicit-arrow-linebreak": "error",
"stylistic/indent": ["error", 2],
"stylistic/indent-binary-ops": ["error", 2],
"stylistic/key-spacing": ["error", { "beforeColon": false, "afterColon": true, "align": { "on": "value", "mode": "minimum" } }],
"stylistic/keyword-spacing": "error",
"stylistic/line-comment-position": ["error", { "position": "above" }],
"stylistic/linebreak-style": ["error", "unix"],
"stylistic/lines-between-class-members": "error",
"stylistic/max-len": ["warn", { "code": 105, "ignoreComments": true, "ignoreUrls": true, "ignoreStrings": true, "ignoreTemplateLiterals": true, "ignorePattern": "class .+ extends|^\\s*\\w+:\\s*\\w+" }],
"stylistic/member-delimiter-style": "error",
"stylistic/multiline-comment-style": ["error", "starred-block"],
"stylistic/new-parens": "error",
"stylistic/no-confusing-arrow": "error",
"stylistic/no-extra-semi": "error",
"stylistic/no-mixed-spaces-and-tabs": "error",
"stylistic/no-tabs": "error",
"stylistic/no-trailing-spaces": "error",
"stylistic/no-whitespace-before-property": "error",
"stylistic/quotes": ["error", "double"]
}}
]);