-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
64 lines (63 loc) · 1.95 KB
/
Copy patheslint.config.mjs
File metadata and controls
64 lines (63 loc) · 1.95 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
57
58
59
60
61
62
63
64
import eslint from '@eslint/js'
import eslintPluginVue from 'eslint-plugin-vue'
import globals from 'globals'
import stylistic from '@stylistic/eslint-plugin'
import typescriptEslint from 'typescript-eslint'
export default typescriptEslint.config(
{ ignores: ['*.d.ts', '**/public'] },
{
extends: [
stylistic.configs.recommended,
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
],
plugins: {
'@stylistic': stylistic,
},
files: [
'source/**/*.{ts,vue}',
'eslint.config.mjs',
'stylelint.config.mjs',
],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.browser,
parserOptions: {
parser: typescriptEslint.parser,
},
},
rules: {
'@stylistic/semi': [1, 'never'],
'@stylistic/quotes': [1, 'single'],
'@stylistic/brace-style': [1, '1tbs', { allowSingleLine: true }],
'@stylistic/object-curly-spacing': [1, 'always'],
'@stylistic/operator-linebreak': [1, 'after'],
'@stylistic/no-multiple-empty-lines': 1,
'@stylistic/spaced-comment': 1,
'@stylistic/space-infix-ops': 1,
'arrow-body-style': [1, 'as-needed', { requireReturnForObjectLiteral: true }],
'max-nested-callbacks': [1, 6],
'no-duplicate-imports': 1,
'no-extend-native': 1,
'no-extra-bind': 1,
'no-unexpected-multiline': 1,
'no-unused-expressions': 1,
'no-useless-backreference': 1,
'prefer-rest-params': 1,
strict: 1,
'@stylistic/comma-dangle': [1, {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
}],
'@stylistic/quote-props': [1, 'as-needed'],
'prefer-const': 1,
'no-var': 1,
'no-useless-escape': [1, { allowRegexCharacters: ['-'] }],
},
}
)