-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patheslint.config.mjs
More file actions
76 lines (74 loc) · 1.97 KB
/
Copy patheslint.config.mjs
File metadata and controls
76 lines (74 loc) · 1.97 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
// @ts-check
import unicorn from 'eslint-plugin-unicorn'
import withNuxt from './.nuxt/eslint.config.mjs'
export default withNuxt(
// Your custom configs here
unicorn.configs.recommended,
{
name: 'stylistic',
rules: {
'camelcase': ['error', { properties: 'always' }],
'no-console': 'error',
'vue/first-attribute-linebreak': ['error', { singleline: 'beside', multiline: 'below' }],
'vue/max-attributes-per-line': [
'warn', { singleline: { max: 4 }, multiline: { max: 4 } },
],
'@stylistic/function-call-spacing': ['error', 'never'],
'@stylistic/max-len': ['error', { code: 100 }],
},
},
{
name: 'coding',
rules: {
'@typescript-eslint/ban-ts-comment': [
'error', { 'ts-expect-error': 'allow-with-description' },
],
},
},
{
name: 'sort-imports',
rules: {
'sort-imports': ['error', {
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
}],
'import/order': ['error', {
'groups': [
'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type',
],
'newlines-between': 'always',
'pathGroups': [
{
pattern: '{#**,@@/**,@/**}',
group: 'internal',
position: 'after',
},
],
'pathGroupsExcludedImportTypes': ['builtin'],
}],
},
},
{
files: ['**/app/**/*.vue'],
rules: {
'unicorn/filename-case': [
'error', { case: 'pascalCase', ignore: ['app.vue'] },
],
'vue/no-multiple-template-root': 'off',
},
},
{
files: ['**/app/**/*.{ts,js}'],
rules: {
'unicorn/filename-case': ['error', { case: 'camelCase' }],
},
},
{
files: ['**/app/{pages,layouts}/**/*.vue', '**/app/{plugins,middleware}/**/*.ts'],
rules: {
'vue/multi-word-component-names': 'off',
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
},
},
)