Install ESLint and Prettier plugins

This commit is contained in:
Maciej Pędzich 2023-05-23 10:05:36 +02:00
parent 8ddb5a89c9
commit deb3d07612
4 changed files with 3006 additions and 23 deletions

View File

@ -1,14 +1,17 @@
module.exports = {
root: true,
env: {
node: true,
node: true
},
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'prettier'
],
plugins: ['prettier'],
rules: {
'vue/multi-word-component-names': 'off',
},
}
'prettier/prettier': 'error'
}
};

2982
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,12 @@
{
"name": "racemash",
"version": "0.0.0",
"version": "0.1.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"lint": "eslint . --fix --ignore-path .gitignore"
"lint": "eslint . --fix --ignore-path .gitignore",
"prettier-format": "prettier --config .prettierrc --ignore-path .gitignore --write \"./**/*.{vue,js,ts}\""
},
"dependencies": {
"@mdi/font": "7.0.96",
@ -22,9 +23,12 @@
"@vitejs/plugin-vue": "^3.2.0",
"@vue/eslint-config-typescript": "^11.0.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.0.0",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-vuetify": "^1.0.0",
"vue-tsc": "^1.2.0"
}

View File

@ -1,10 +1,11 @@
// Plugins
import vue from '@vitejs/plugin-vue'
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
import vue from '@vitejs/plugin-vue';
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
import eslint from 'vite-plugin-eslint';
// Utilities
import { defineConfig } from 'vite'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite';
import { fileURLToPath, URL } from 'node:url';
// https://vitejs.dev/config/
export default defineConfig({
@ -14,25 +15,18 @@ export default defineConfig({
}),
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
vuetify({
autoImport: true,
autoImport: true
}),
eslint()
],
define: { 'process.env': {} },
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
extensions: [
'.js',
'.json',
'.jsx',
'.mjs',
'.ts',
'.tsx',
'.vue',
],
extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue']
},
server: {
port: 3000,
},
})
port: 3000
}
});