Skip to content

Commit

Permalink
fix: eslint 9 with flat config integration
Browse files Browse the repository at this point in the history
  • Loading branch information
trobonox committed Jun 9, 2024
1 parent 3c0cef5 commit d98675a
Show file tree
Hide file tree
Showing 6 changed files with 275 additions and 56 deletions.
21 changes: 0 additions & 21 deletions .eslintrc.cjs

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"editor.codeActionsOnSave": {
"source.fixAll": "never",
"source.fixAll.eslint": "always"
}
},
"eslint.experimental.useFlatConfig": true
}
21 changes: 21 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import withNuxt from './.nuxt/eslint.config.mjs'
import tailwind from "eslint-plugin-tailwindcss";

export default withNuxt(
...tailwind.configs["flat/recommended"],
{
files: ['**/*.ts', '**/*.vue'],
rules: {
"indent": ["warn", 4],
"no-undef": "off",
"perfectionist/sort-vue-attributes": "off",
"tailwindcss/no-custom-classname": "off",
"vue/html-indent": ["warn", 4],
"vue/multi-word-component-names": "off",
"vue/v-on-event-hyphenation": "off"
}
},
{
ignores: ["src-tauri/**/*", "dist/**/*"]
}
)
3 changes: 2 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default defineNuxtConfig({
"@pinia/nuxt",
"@vueuse/nuxt",
'radix-vue/nuxt',
"nuxt-better-optimize-deps"
"nuxt-better-optimize-deps",
"@nuxt/eslint"
],
ssr: false,
telemetry: false,
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"description": "Offline-first Kanban board desktop app",
"author": "trobonox <[email protected]>",
"license": "GPL-3.0+",
"type": "module",
"scripts": {
"init:armv7": "docker build . -t rust_cross_compile/armv7 -f Dockerfile.armv7",
"init:arm64": "docker build . -t rust_cross_compile/arm64 -f Dockerfile.arm64",
Expand All @@ -16,6 +17,7 @@
"lint": "eslint . --fix"
},
"devDependencies": {
"@nuxt/eslint": "^0.3.13",
"@nuxt/eslint-config": "0.3.13",
"@nuxtjs/tailwindcss": "6.12.0",
"@tauri-apps/cli": "1.5.14",
Expand All @@ -28,9 +30,11 @@
"nuxt": "^3.7.1",
"nuxt-better-optimize-deps": "^0.1.0",
"postcss-custom-properties": "13.3.10",
"rollup-plugin-license": "^3.0.1"
"rollup-plugin-license": "^3.0.1",
"typescript": "^5.4.5"
},
"dependencies": {
"@eslint/eslintrc": "^3.1.0",
"@heroicons/vue": "2.1.3",
"@paralleldrive/cuid2": "^2.1.0",
"@phosphor-icons/vue": "^2.1.6",
Expand Down
Loading

0 comments on commit d98675a

Please sign in to comment.