Skip to content

Commit d9ec6a4

Browse files
committed
build: update eslint and prettier config
1 parent 5def136 commit d9ec6a4

File tree

3 files changed

+9
-28
lines changed

3 files changed

+9
-28
lines changed

.eslintrc.js

+4-27
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
11
module.exports = {
2-
root: true,
3-
env: {
4-
node: true,
5-
},
6-
extends: [
7-
'plugin:vue/vue3-essential',
8-
'eslint:recommended',
9-
'plugin:prettier/recommended',
10-
],
11-
parserOptions: {
12-
parser: '@babel/eslint-parser',
13-
},
2+
extends: ["plugin:vue/vue3-recommended", "eslint:recommended"],
143
rules: {
15-
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16-
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
17-
'vue/multi-word-component-names': 'off',
4+
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
5+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
186
},
19-
overrides: [
20-
{
21-
files: [
22-
'**/__tests__/*.{j,t}s?(x)',
23-
'**/tests/unit/**/*.spec.{j,t}s?(x)',
24-
],
25-
env: {
26-
jest: true,
27-
},
28-
},
29-
],
30-
}
7+
};

.prettierrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ module.exports = {
22
semi: false,
33
trailingComma: "all",
44
singleQuote: true,
5-
tabWidth: 2
5+
printWidth: 100,
6+
tabWidth: 2,
67
};

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"scripts": {
1515
"dev": "vite",
1616
"build": "vite build",
17+
"lint": "eslint \"src/**/*.{js,vue}\"",
1718
"preview": "vite preview"
1819
},
1920
"dependencies": {
@@ -30,6 +31,8 @@
3031
},
3132
"devDependencies": {
3233
"@vitejs/plugin-vue": "^4.2.3",
34+
"eslint": "^8.50.0",
35+
"eslint-plugin-vue": "^9.17.0",
3336
"sass": "^1.68.0",
3437
"vite": "^4.4.5"
3538
}

0 commit comments

Comments
 (0)