-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
59 lines (50 loc) · 1.41 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
// This is a flat ESLint config file
// To see all linting rules, run `pnpm lint:inspect` or `npx @eslint/config-inspector`
// To run ESLint on the entire project without applying any fixes, run `pnpm lint`
// To run ESLint on the entire project and apply fixes, run `pnpm lint:fix`
import antfu from '@antfu/eslint-config'
import { FlatCompat } from '@eslint/eslintrc'
const compat = new FlatCompat()
export default antfu(
{
// Enable stylistic formatting rules
stylistic: true,
// Or customize the stylistic rules
// stylistic: {
// indent: 2, // 4, or 'tab'
// quotes: 'single', // or 'double'
// },
react: true,
// astro: true, // Need `eslint-plugin-astro` and `prettier-plugin-astro`
// Disable jsonc and yaml support
// jsonc: false,
// yaml: false,
ignores: ['**/public', '**/node_modules'],
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',
},
},
// Legacy config
...compat.config({
extends: [
// 'eslint:recommended',
// Other extends...
],
}),
// Other flat configs...
)