-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
73 lines (72 loc) · 2.13 KB
/
eslint.config.mjs
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
import antfu from '@antfu/eslint-config'
import withNuxt from './.nuxt/eslint.config.mjs'
// https://antfu.me/posts/why-not-prettier
export default withNuxt(
antfu({
standalone: false,
stylistic: {
semi: false,
},
formatters: {
/**
* Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
* By default uses Prettier
*/
css: true,
/**
* Format HTML files
* By default uses Prettier
*/
html: true,
/**
* Format Markdown files
* Supports Prettier and dprint
* By default uses Prettier
*/
markdown: 'prettier',
},
typescript: {
tsconfigPath: 'tsconfig.json',
},
vue: true,
}),
{
rules: {
'no-console': 'off',
'vue/no-v-html': 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/no-explicit-any': 'off',
// https://typescript-eslint.io/rules/ban-ts-comment
'ts/no-unsafe-assignment': 'off', // temporarily disabled
'unused-imports/no-unused-vars': 'off', // some are used in template tags, which causes false positives
'@typescript-eslint/ban-ts-comment': 'off',
'ts/ban-ts-comment': 'off',
'node/prefer-global/process': 'off',
'node/prefer-global/buffer': 'off',
// https://typescript-eslint.io/rules/strict-boolean-expressions
'ts/strict-boolean-expressions': 'off',
'no-cond-assign': ['error', 'except-parens'],
'curly': ['error', 'all'],
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
'max-statements-per-line': ['error', { max: 1 }],
'style/indent': ['error', 2],
'style/brace-style': ['error', '1tbs', { allowSingleLine: false }],
'antfu/consistent-list-newline': 'off',
},
},
{
files: ['**/*.md'],
rules: {
'no-irregular-whitespace': 'off',
'format/prettier': 'off',
'style/no-multiple-empty-lines': 'off',
},
},
{
files: ['**/migrations-prod/schema.ts', '**/migrations-dev/schema.ts'],
rules: {
'ts/no-use-before-define': 'off',
},
},
)