forked from onetimesecret/docs.onetimesecret.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
55 lines (47 loc) · 1.33 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
/* eslint-env node */
/**
*
* Follows formatting config via: /~https://github.com/antfu/eslint-config
*
* To view rules in browser, run `pnpx @eslint/config-inspector`
*
* http://localhost:7777/rules
*
*
* Why not dprint/prettier?
*
* dprint is in the same model as Prettier which reads the AST and reprints the
* code from scratch. This means it's similar to Prettier, which ignores the
* original line breaks and might also cause the inconsistent diff. So in
* general, we prefer to use ESLint to format and lint JavaScript/TypeScript
* code.
*
*
* Disabling rules:
*
* Use 'ts/' prefix instead of '@typescript-eslint/'.
*
* e.g.
* eslint-disable-next-line ts/consistent-type-definitions
*
*/
import antfu from '@antfu/eslint-config';
export default antfu({
// Type of the project. 'lib' for libraries, the default is 'app'
type: 'app',
'comma-dangle': ['error', 'always-multiline'],
// Enable stylistic formatting rules
// stylistic: true,
// Or customize the stylistic rules
stylistic: {
indent: 2, // 4, or 'tab'
quotes: 'single', // or 'double',
semi: true,
},
// To enable UnoCSS support, you need to explicitly turn it on:
unocss: true,
// `.eslintignore` is no longer supported in Flat config, use `ignores` instead
ignores: [
// Add your ignore patterns here
],
});