Skip to content

Commit

Permalink
fix: prittier & eslint conflicting duo
Browse files Browse the repository at this point in the history
(cherry picked from commit 7d18799)
  • Loading branch information
DanilShapilov committed Mar 7, 2024
1 parent dac7ecd commit f36a93b
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
parser: '@babel/eslint-parser',
requireConfigFile: false,
},
extends: ['plugin:vue/essential', 'eslint:recommended'],
extends: ['plugin:vue/essential', 'eslint:recommended', 'plugin:prettier/recommended'],
plugins: ['prettier'],
rules: {
'linebreak-style': ['error', 'unix'],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
"core-js": "^3.35.0",
"css-loader": "^6.9.0",
"eslint": "^8.56.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.20.1",
"husky": "^8.0.3",
"laravel-mix": "^6.0.49",
Expand All @@ -89,7 +90,7 @@
"laravel-mix-sri": "^1.0.7",
"laravel-mix-workbox": "^0.1.4",
"postcss": "^8.4.31",
"prettier": "2.8.8",
"prettier": "3.2.5",
"resolve-url-loader": "^5.0.0",
"sass": "^1.70.0",
"sass-loader": "^13.3.3",
Expand Down
96 changes: 48 additions & 48 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
module.exports = {
printWidth: 120,
tabWidth: 4,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'avoid',
endOfLine: 'lf',
vueIndentScriptAndStyle: true,
overrides: [
{
files: '*.js',
options: {
parser: 'babel',
},
},
{
files: '*.ts',
options: {
parser: 'typescript',
},
},
{
files: '*.md',
options: {
parser: 'markdown',
},
},
{
files: '*.json',
options: {
parser: 'json',
},
},
{
files: '.prettierrc',
options: {
parser: 'json',
},
},
{
files: '.stylelintrc',
options: {
parser: 'json',
},
},
],
printWidth: 120,
tabWidth: 4,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'avoid',
endOfLine: 'lf',
vueIndentScriptAndStyle: true,
overrides: [
{
files: '*.js',
options: {
parser: 'babel',
},
},
{
files: '*.ts',
options: {
parser: 'typescript',
},
},
{
files: '*.md',
options: {
parser: 'markdown',
},
},
{
files: '*.json',
options: {
parser: 'json',
},
},
{
files: '.prettierrc',
options: {
parser: 'json',
},
},
{
files: '.stylelintrc',
options: {
parser: 'json',
},
},
],
};
74 changes: 62 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,8 @@ __metadata:
css-loader: ^6.9.0
dotenv: ^16.4.2
eslint: ^8.56.0
eslint-plugin-prettier: ^4.2.1
eslint-config-prettier: ^9.1.0
eslint-plugin-prettier: ^5.1.3
eslint-plugin-vue: ^9.20.1
fabric: ^5.3.0
husky: ^8.0.3
Expand All @@ -1358,7 +1359,7 @@ __metadata:
moment-timezone: ^0.5.45
path-browserify: ^1.0.1
postcss: ^8.4.31
prettier: 2.8.8
prettier: 3.2.5
pusher-js: ^8.4.0-rc2
resolve-url-loader: ^5.0.0
sass: ^1.70.0
Expand Down Expand Up @@ -1914,6 +1915,13 @@ __metadata:
languageName: node
linkType: hard

"@pkgr/core@npm:^0.1.0":
version: 0.1.1
resolution: "@pkgr/core@npm:0.1.1"
checksum: 6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba
languageName: node
linkType: hard

"@polka/url@npm:^1.0.0-next.20":
version: 1.0.0-next.21
resolution: "@polka/url@npm:1.0.0-next.21"
Expand Down Expand Up @@ -5025,18 +5033,34 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^4.2.1":
version: 4.2.1
resolution: "eslint-plugin-prettier@npm:4.2.1"
"eslint-config-prettier@npm:^9.1.0":
version: 9.1.0
resolution: "eslint-config-prettier@npm:9.1.0"
peerDependencies:
eslint: ">=7.0.0"
bin:
eslint-config-prettier: bin/cli.js
checksum: 9229b768c879f500ee54ca05925f31b0c0bafff3d9f5521f98ff05127356de78c81deb9365c86a5ec4efa990cb72b74df8612ae15965b14136044c73e1f6a907
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^5.1.3":
version: 5.1.3
resolution: "eslint-plugin-prettier@npm:5.1.3"
dependencies:
prettier-linter-helpers: ^1.0.0
synckit: ^0.8.6
peerDependencies:
eslint: ">=7.28.0"
prettier: ">=2.0.0"
"@types/eslint": ">=8.0.0"
eslint: ">=8.0.0"
eslint-config-prettier: "*"
prettier: ">=3.0.0"
peerDependenciesMeta:
"@types/eslint":
optional: true
eslint-config-prettier:
optional: true
checksum: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6
checksum: eb2a7d46a1887e1b93788ee8f8eb81e0b6b2a6f5a66a62bc6f375b033fc4e7ca16448da99380be800042786e76cf5c0df9c87a51a2c9b960ed47acbd7c0b9381
languageName: node
linkType: hard

Expand Down Expand Up @@ -5338,9 +5362,9 @@ __metadata:
linkType: hard

"fast-diff@npm:^1.1.2":
version: 1.2.0
resolution: "fast-diff@npm:1.2.0"
checksum: 1b5306eaa9e826564d9e5ffcd6ebd881eb5f770b3f977fcbf38f05c824e42172b53c79920e8429c54eb742ce15a0caf268b0fdd5b38f6de52234c4a8368131ae
version: 1.3.0
resolution: "fast-diff@npm:1.3.0"
checksum: d22d371b994fdc8cce9ff510d7b8dc4da70ac327bcba20df607dd5b9cae9f908f4d1028f5fe467650f058d1e7270235ae0b8230809a262b4df587a3b3aa216c3
languageName: node
linkType: hard

Expand Down Expand Up @@ -9058,7 +9082,16 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:2.8.8, prettier@npm:^1.18.2 || ^2.0.0":
"prettier@npm:3.2.5":
version: 3.2.5
resolution: "prettier@npm:3.2.5"
bin:
prettier: bin/prettier.cjs
checksum: 2ee4e1417572372afb7a13bb446b34f20f1bf1747db77cf6ccaf57a9be005f2f15c40f903d41a6b79eec3f57fff14d32a20fb6dee1f126da48908926fe43c311
languageName: node
linkType: hard

"prettier@npm:^1.18.2 || ^2.0.0":
version: 2.8.8
resolution: "prettier@npm:2.8.8"
bin:
Expand Down Expand Up @@ -10486,6 +10519,16 @@ __metadata:
languageName: node
linkType: hard

"synckit@npm:^0.8.6":
version: 0.8.8
resolution: "synckit@npm:0.8.8"
dependencies:
"@pkgr/core": ^0.1.0
tslib: ^2.6.2
checksum: 9ed5d33abb785f5f24e2531efd53b2782ca77abf7912f734d170134552b99001915531be5a50297aa45c5701b5c9041e8762e6cd7a38e41e2461c1e7fccdedf8
languageName: node
linkType: hard

"tapable@npm:^2.1.1, tapable@npm:^2.2.0":
version: 2.2.1
resolution: "tapable@npm:2.2.1"
Expand Down Expand Up @@ -10730,6 +10773,13 @@ __metadata:
languageName: node
linkType: hard

"tslib@npm:^2.6.2":
version: 2.6.2
resolution: "tslib@npm:2.6.2"
checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad
languageName: node
linkType: hard

"tty-browserify@npm:0.0.0":
version: 0.0.0
resolution: "tty-browserify@npm:0.0.0"
Expand Down

0 comments on commit f36a93b

Please sign in to comment.