build: update eslint and prettier config

This commit is contained in:
mrholek
2023-09-26 17:57:51 +02:00
parent 5def136d9a
commit d9ec6a488f
3 changed files with 9 additions and 28 deletions
+4 -27
View File
@@ -1,30 +1,7 @@
module.exports = { module.exports = {
root: true, extends: ["plugin:vue/vue3-recommended", "eslint:recommended"],
env: {
node: true,
},
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'plugin:prettier/recommended',
],
parserOptions: {
parser: '@babel/eslint-parser',
},
rules: { rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
'vue/multi-word-component-names': 'off',
}, },
overrides: [ };
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
}
+2 -1
View File
@@ -2,5 +2,6 @@ module.exports = {
semi: false, semi: false,
trailingComma: "all", trailingComma: "all",
singleQuote: true, singleQuote: true,
tabWidth: 2 printWidth: 100,
tabWidth: 2,
}; };
+3
View File
@@ -14,6 +14,7 @@
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"lint": "eslint \"src/**/*.{js,vue}\"",
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
@@ -30,6 +31,8 @@
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.2.3",
"eslint": "^8.50.0",
"eslint-plugin-vue": "^9.17.0",
"sass": "^1.68.0", "sass": "^1.68.0",
"vite": "^4.4.5" "vite": "^4.4.5"
} }