Skip to content

Commit b14b95d

Browse files
committed
feat(eslint): antfu config for eslint
1 parent 368c36b commit b14b95d

File tree

4 files changed

+1430
-160
lines changed

4 files changed

+1430
-160
lines changed

Diff for: eslint.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu({
4+
typescript: true,
5+
ignores: [
6+
'.output',
7+
'dist',
8+
'node_modules',
9+
],
10+
rules: {
11+
'style/brace-style': ['error', '1tbs'],
12+
'style/arrow-parens': ['error', 'always'],
13+
'curly': ['error', 'all'],
14+
'antfu/consistent-list-newline': 'off',
15+
},
16+
})

Diff for: nuxt.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
22
export default defineNuxtConfig({
3-
devtools: { enabled: true }
3+
devtools: { enabled: true },
44
})

Diff for: package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
22
"name": "nuxt-app",
3-
"private": true,
43
"type": "module",
4+
"private": true,
55
"scripts": {
66
"build": "nuxt build",
77
"dev": "nuxt dev",
88
"generate": "nuxt generate",
99
"preview": "nuxt preview",
10-
"postinstall": "nuxt prepare"
10+
"postinstall": "nuxt prepare",
11+
"lint": "eslint . --fix"
12+
},
13+
"dependencies": {
14+
"@antfu/eslint-config": "^2.4.6"
1115
},
1216
"devDependencies": {
1317
"@nuxt/devtools": "latest",

0 commit comments

Comments
 (0)