Skip to content

Commit

Permalink
feat(eslint): antfu config for eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Dec 23, 2023
1 parent 368c36b commit b14b95d
Show file tree
Hide file tree
Showing 4 changed files with 1,430 additions and 160 deletions.
16 changes: 16 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import antfu from '@antfu/eslint-config'

export default antfu({
typescript: true,
ignores: [
'.output',
'dist',
'node_modules',
],
rules: {
'style/brace-style': ['error', '1tbs'],
'style/arrow-parens': ['error', 'always'],
'curly': ['error', 'all'],
'antfu/consistent-list-newline': 'off',
},
})
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true }
devtools: { enabled: true },
})
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "nuxt-app",
"private": true,
"type": "module",
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
"postinstall": "nuxt prepare",
"lint": "eslint . --fix"
},
"dependencies": {
"@antfu/eslint-config": "^2.4.6"
},
"devDependencies": {
"@nuxt/devtools": "latest",
Expand Down
Loading

0 comments on commit b14b95d

Please sign in to comment.