Skip to content

Commit 4632fa3

Browse files
authored
refactor(eslint): migrate to Antfu ESLint configuration (#2)
1 parent 5142d13 commit 4632fa3

3 files changed

Lines changed: 975 additions & 13 deletions

File tree

eslint.config.mjs

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
1-
// @ts-check
1+
import antfu from '@antfu/eslint-config'
22
import withNuxt from './.nuxt/eslint.config.mjs'
33

4-
export default withNuxt(
5-
// Your custom configs here
6-
)
4+
export default antfu({
5+
vue: {
6+
overrides: {
7+
'vue/block-order': [
8+
'error',
9+
{
10+
order: ['template', 'script', 'style'],
11+
},
12+
],
13+
},
14+
},
15+
stylistic: {
16+
indent: 4,
17+
quotes: 'single',
18+
},
19+
yaml: {
20+
overrides: {
21+
'yaml/indent': ['error', 2],
22+
},
23+
},
24+
rules: {
25+
'no-console': 'off',
26+
'regexp/no-unused-capturing-group': 'off',
27+
'node/prefer-global/process': 'off',
28+
'unused-imports/no-unused-vars': 'off',
29+
'symbol-description': 'off',
30+
},
31+
}).append(withNuxt)

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "pkg-placeholder",
33
"type": "module",
4-
"description": "_description_",
54
"packageManager": "pnpm@10.33.0",
5+
"description": "_description_",
6+
"license": "MIT",
67
"homepage": "https://github.com/lonewolfyx/pkg-placeholder",
78
"bugs": {
89
"url": "https://github.com/lonewolfyx/pkg-placeholder/issues"
@@ -29,11 +30,13 @@
2930
"vue-router": "^4.6.4"
3031
},
3132
"devDependencies": {
33+
"@antfu/eslint-config": "^8.2.0",
3234
"@nuxt/content": "^3.12.0",
3335
"@nuxt/eslint": "^1.15.2",
3436
"@nuxt/icon": "^2.2.1",
3537
"@vueuse/nuxt": "^14.2.1",
3638
"eslint": "^10.1.0",
39+
"jiti": "^2.6.1",
3740
"lint-staged": "^16.4.0",
3841
"nuxt": "^4.4.2",
3942
"picocolors": "^1.1.1",
@@ -47,7 +50,6 @@
4750
"pre-commit": "npx lint-staged",
4851
"commit-msg": "node scripts/verify-commit.js"
4952
},
50-
"license": "MIT",
5153
"lint-staged": {
5254
"*": "eslint --fix"
5355
}

0 commit comments

Comments
 (0)