Skip to content

Commit b5457d9

Browse files
committed
fix: remove @vue/prettier configs, move prettier overrides into separate file
clashes
1 parent 99d5086 commit b5457d9

File tree

5 files changed

+14
-60
lines changed

5 files changed

+14
-60
lines changed

index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
extends: [
1111
'eslint:recommended',
1212
'plugin:@typescript-eslint/recommended',
13-
'plugin:prettier/recommended',
13+
'./prettier.js',
1414
'plugin:import/errors',
1515
'plugin:import/warnings',
1616
'plugin:import/typescript',
@@ -49,11 +49,8 @@ module.exports = {
4949
patterns: ['src', 'dist'],
5050
},
5151
],
52-
'arrow-body-style': 'error',
53-
'prettier/prettier': 'error',
5452
'no-console': 'warn',
5553
'no-useless-concat': 'error',
56-
curly: ['error'],
5754
'prefer-const': 'error',
5855
'spaced-comment': ['error', 'always'],
5956
'object-shorthand': ['error', 'always'],

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
"@rushstack/eslint-patch": "^1.0.6",
2121
"@typescript-eslint/eslint-plugin": "4.24.0",
2222
"@typescript-eslint/parser": "4.24.0",
23-
"@vue/eslint-config-prettier": "6.0.0",
24-
"@vue/eslint-config-typescript": "7.0.0",
2523
"eslint-config-prettier": "8.1.0",
2624
"eslint-plugin-import": "2.22.1",
2725
"eslint-plugin-jest": "24.3.1",

pnpm-lock.yaml

Lines changed: 0 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prettier.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: ['plugin:prettier/recommended'],
3+
rules: {
4+
// enable in accordance with https://github.com/prettier/eslint-config-prettier#curly
5+
curly: ['error', 'all'],
6+
7+
// risky because of https://github.com/prettier/eslint-plugin-prettier#arrow-body-style-and-prefer-arrow-callback-issue
8+
'arrow-body-style': 'error',
9+
'prefer-arrow-callback': 'error',
10+
},
11+
};

vue.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ module.exports = {
1717
'./jest.js',
1818

1919
'plugin:vue/vue3-recommended',
20-
'@vue/typescript/recommended',
21-
'@vue/prettier',
22-
'@vue/prettier/@typescript-eslint',
20+
'./prettier.js',
2321
'plugin:vue-scoped-css/recommended',
2422
'plugin:@intlify/vue-i18n/recommended',
2523
],
2624

2725
rules: {
2826
'vue/attribute-hyphenation': 'error',
27+
// enable in accordance with https://github.com/prettier/eslint-config-prettier#vuehtml-self-closing
2928
'vue/html-self-closing': [
3029
'error',
3130
{
@@ -84,10 +83,6 @@ module.exports = {
8483
'vue-scoped-css/no-unused-selector': 'error',
8584
'vue-scoped-css/no-parsing-error': 'error',
8685
'vue-scoped-css/require-scoped': 'error',
87-
88-
// set this again because some extended config disabled it
89-
'prettier/prettier': 'error',
90-
curly: 'error',
9186
},
9287

9388
settings: {

0 commit comments

Comments
 (0)