eslint.config.mjs
1.02 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
import antfu from "@antfu/eslint-config";
export default antfu({
// `.eslintignore` is no longer supported in Flat config, use `ignores` instead.
ignores: [
"**/fixtures",
"**/.cache",
"**/.data",
"**/.gitignore",
"**/.env",
"**/.env.dist",
"**/.output",
"**/.nitro",
"**/.nuxt",
"**/assets",
"**/dist",
"**/logs",
"**/node_modules",
"**/public",
"**/server",
],
// Disable jsonc and yaml support.
jsonc: false,
markdown: false,
// personnal rules.
rules: {
"antfu/if-newline": 0,
"antfu/curly": 0,
},
// Enable stylistic formatting rules.
// stylistic: true,
// Or customize the stylistic rules.
stylistic: {
indent: 2, // 4, or 'tab'
semi: true,
stylistic: true,
quotes: "double", // 'single' or 'double'.
},
// Type of the project. 'lib' for libraries, the default is 'app'.
type: "app",
// TypeScript and Vue are autodetected, you can also explicitly enable them:
typescript: true,
vue: true,
yaml: false,
});