-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.js
40 lines (38 loc) · 1.15 KB
/
eslint.config.js
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
import antfu from '@antfu/eslint-config'
// `@ts-expect-error` will complains "unused" in dev environment when the eslint file exists, so here we uses `@ts-ignore`
// @ts-ignore cannot find module eslintConfig in CI pipeline test as it's not generated by nuxt yet
import frontendNuxtConfig from 'frontend/eslintConfig'
export default frontendNuxtConfig(await antfu(
{
typescript: true,
vue: true,
unocss: true,
ignores: [
'.sst',
],
},
{
files: ['apps/backend/**'],
rules: {
// Disable automatically transform `type` to `interface`, because Hono require the Bindings to be type.
'ts/consistent-type-definitions': 'off',
},
},
{
rules: {
// Allow trailing space in comments, for possible JSDoc formattings
'style/no-trailing-spaces': ['error', { ignoreComments: true }],
// Relaxes inline statements a bit
'style/max-statements-per-line': ['error', { max: 2 }],
// Allow top-level await
'antfu/no-top-level-await': 'off',
},
},
// Allow trailing space for markdown formatting
{
files: ['**/*.md'],
rules: {
'style/no-trailing-spaces': 'off',
},
},
))