feat: Add ESLint and Prettier configuration files with necessary scripts in package.json
This commit is contained in:
7
.prettierrc
Normal file
7
.prettierrc
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 100,
|
||||
"tabWidth": 2
|
||||
}
|
||||
9
eslint.config.mjs
Normal file
9
eslint.config.mjs
Normal file
@@ -0,0 +1,9 @@
|
||||
// Run `nuxt prepare` once before linting so .nuxt/eslint.config.mjs is generated.
|
||||
import withNuxt from './.nuxt/eslint.config.mjs';
|
||||
|
||||
export default withNuxt({
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
},
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
export default defineNuxtConfig({
|
||||
devtools: { enabled: true },
|
||||
modules: ['@nuxtjs/tailwindcss', '@pinia/nuxt'],
|
||||
modules: ['@nuxtjs/tailwindcss', '@pinia/nuxt', '@nuxt/eslint'],
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
apiBaseUrl: '', // set via NUXT_PUBLIC_API_BASE_URL
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"format": "prettier --write .",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:update": "vitest --update-snapshots"
|
||||
@@ -18,9 +21,12 @@
|
||||
"vue": "^3.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/eslint": "^1.0.0",
|
||||
"@nuxt/test-utils": "^3.15.0",
|
||||
"@nuxtjs/tailwindcss": "^6.13.0",
|
||||
"@vitest/coverage-v8": "^3.0.0",
|
||||
"eslint": "^9.0.0",
|
||||
"prettier": "^3.0.0",
|
||||
"typescript": "^5.7.0",
|
||||
"vitest": "^3.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user