-
Notifications
You must be signed in to change notification settings - Fork 213
Expand file tree
/
Copy patheslint.config.mjs
More file actions
49 lines (43 loc) · 1.71 KB
/
eslint.config.mjs
File metadata and controls
49 lines (43 loc) · 1.71 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
import { defineConfig } from 'eslint/config';
import ts from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
export default defineConfig(
ts.configs.recommended,
{
ignores: ['src/z-worker-inline.js'],
plugins: {
'@typescript-eslint': ts.plugin,
'@stylistic': stylistic,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-unused-vars': ['error', { 'vars': 'all', 'args': 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
// '@typescript-eslint/no-use-before-define': ['error', { 'functions': false, 'classes': false }],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-this-alias': 'off',
'prefer-rest-params': 'off',
'prefer-const': 'off',
'@typescript-eslint/prefer-as-const': 'off',
'@typescript-eslint/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true }],
'@typescript-eslint/no-require-imports': ['error', { 'allow': ['^xml-flow$'] }],
// Syntax
'@stylistic/comma-dangle': ['error', 'only-multiline'],
'@stylistic/quotes': ['error', 'single', { 'allowTemplateLiterals': 'always' }],
'@stylistic/semi': ['error'],
'@stylistic/member-delimiter-style': ['error', { 'singleline': { 'delimiter': 'comma' } }],
'@stylistic/dot-location': ['error', 'property'],
// Braces
'curly': ['error', 'multi-line'],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/brace-style': ['error', 'stroustrup'],
// Indentation
'@stylistic/indent': ['error', 'tab', {
'SwitchCase': 1,
}],
'@stylistic/no-tabs': 'off',
},
},
);