Skip to content

Commit 7d3c8e4

Browse files
committed
Added Prettier to ESLint / VSCode
Added instructions in package.md and eslintrc.js to change.
1 parent 0efe17f commit 7d3c8e4

23 files changed

+243
-586
lines changed

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "none",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true,
6+
"printWidth": 100
7+
}

ClientApp/.eslintrc.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,34 @@ module.exports = {
22
env: {
33
node: true
44
},
5-
'extends': [
5+
/* ES Lint Standard config
6+
extends: [
67
'plugin:vue/essential',
78
'@vue/standard',
89
'@vue/typescript/recommended'
910
],
11+
*/
12+
/* ESLint + Prettier config */
13+
extends: [
14+
'plugin:vue/essential',
15+
'eslint:recommended',
16+
'@vue/typescript/recommended',
17+
'@vue/prettier',
18+
'@vue/prettier/@typescript-eslint'
19+
],
1020
parserOptions: {
1121
ecmaVersion: 2020
1222
},
1323
rules: {
1424
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
15-
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
25+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
26+
'space-before-function-paren': [
27+
'error',
28+
{
29+
anonymous: 'always',
30+
named: 'never',
31+
asyncArrow: 'always'
32+
}
33+
]
1634
}
1735
}

ClientApp/babel.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['@vue/cli-plugin-babel/preset']
3-
};
2+
presets: ['@vue/cli-plugin-babel/preset']
3+
}

0 commit comments

Comments
 (0)