-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
76 lines (75 loc) · 2.84 KB
/
eslint.config.js
File metadata and controls
76 lines (75 loc) · 2.84 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
65
66
67
68
69
70
71
72
73
74
75
76
import vue from 'eslint-plugin-vue'
import js from '@eslint/js'
import ts from 'typescript-eslint'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import importPlugin from 'eslint-plugin-import'
export default defineConfigWithVueTs(
{ files: ['**/*.{js,ts,d.ts,vue}'], },
{
ignores: [
'node_modules',
'loaders',
'client/dist',
'client/components/ui',
'server/templates',
]
},
js.configs.recommended,
ts.configs.recommended,
vue.configs['flat/essential'],
vue.configs['flat/recommended'],
vue.configs['flat/strongly-recommended'],
vueTsConfigs.recommended,
importPlugin.flatConfigs.typescript,
{
rules: {
'indent': ['error', 4],
'semi': ['error', 'never'],
'quotes': ['error', 'single'],
'import/extensions': ['error', 'ignorePackages'],
'import/no-unresolved': 'off',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import/order': 'error',
'import/newline-after-import': 'error',
'object-curly-newline': ['error', {
ObjectExpression: {
multiline: true,
minProperties: 2
},
ObjectPattern: { multiline: true },
ImportDeclaration: { multiline: true }
}],
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: false }],
'object-curly-spacing': ['error', 'always'],
'array-element-newline': ['error', { 'ArrayExpression': 'consistent' }],
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
'newline-per-chained-call': ['error', { 'ignoreChainWithDepth': 2 }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-unused-vars': ['warn', {
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_'
}],
'vue/html-indent': ['error', 4],
'vue/multi-word-component-names': 'off',
'vue/max-attributes-per-line': ['error', {
'singleline': { 'max': 1 },
'multiline': { 'max': 1 }
}],
'vue/no-v-html': ['off'],
'vue/no-v-text-v-html-on-component': ['off'],
'vue/no-mutating-props': 'off',
'vue/no-ref-as-operand': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
},
},
{
files: [
'**/client/**/*.ts',
'**/client/**/*.vue',
'**/modules/**/client/**/*.ts',
'**/modules/**/client/**/*.vue',
],
rules: { 'import/extensions': 'off', }
}
)