Skip to content

Commit

Permalink
chore: migrate to Nuxt ESLint (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinGangan committed Jun 11, 2024
1 parent 7630bb7 commit e9af679
Show file tree
Hide file tree
Showing 6 changed files with 369 additions and 1,917 deletions.
46 changes: 40 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
import antfu from '@antfu/eslint-config'
// @ts-check
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'

export default antfu({
rules: {
'no-use-before-define': 'off',
'node/prefer-global/buffer': 'off',
'node/prefer-global/process': 'off',
export default createConfigForNuxt({
features: {
stylistic: true,
tooling: true,
},
dirs: {
src: ['./src', './client', './docs'],
},
})
.override('nuxt/javascript', {
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
},
})
.override('nuxt/typescript/rules', {
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': true,
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
// TODO: Discuss if we want to enable this
'@typescript-eslint/no-invalid-void-type': 'off',
// TODO: Discuss if we want to enable this
'@typescript-eslint/no-explicit-any': 'off',
},
})
.override('nuxt/vue/rules', {
rules: {
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
'vue/require-default-prop': 'off',
'vue/no-multiple-template-root': 'off',
// NOTE: Disable this style rules if stylistic is not enabled
'vue/max-attributes-per-line': 'off',
},
})
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@
"valibot": "^0.30.0"
},
"devDependencies": {
"@antfu/eslint-config": "2.19.1",
"@nuxt/devtools-ui-kit": "^1.3.3",
"@nuxt/eslint-config": "^0.3.13",
"@nuxt/module-builder": "^0.7.0",
"@nuxt/test-utils": "3.13.1",
"@types/semver": "^7.5.8",
"@unhead/schema": "^1.9.12",
"acorn-loose": "^8.4.0",
"bumpp": "^9.4.1",
"changelogen": "^0.5.5",
"eslint": "9.3.0",
"eslint": "9.4.0",
"nuxt": "^3.11.2",
"playwright-core": "^1.44.1",
"typescript": "^5.4.5",
Expand Down
Loading

0 comments on commit e9af679

Please sign in to comment.