diff --git a/.eslintrc.js b/.eslintrc.js index b4cbe543..3a6a904a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,7 +21,7 @@ module.exports = { node: true }, - extends: ['airbnb-base', 'plugin:vue/recommended', '@vue/typescript'], + extends: ['airbnb-base', 'plugin:vue/recommended', '@vue/typescript',"prettier"], globals: { __static: 'writable', diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..dc2fb828 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} \ No newline at end of file diff --git a/package.json b/package.json index 17444b87..07e50878 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "lint:react": "cd ui-react && yarn lint", "lint": "yarn lint:backend && yarn lint:react", "lint:fix": "yarn lint --fix && yarn lint:react --fix", + "format": "prettier . --write", "typeCheck": "tsc --noEmit", "unit": "vue-cli-service test:unit", "e2e": "vue-cli-service test:unit --config='test/e2e/jest.e2e.config.js'", @@ -98,6 +99,7 @@ "electron": "^17.0.0", "eslint": "^7.1.0", "eslint-config-airbnb-base": "^14.1.0", + "eslint-config-prettier": "^9.0.0", "eslint-friendly-formatter": "^4.0.1", "eslint-import-resolver-alias": "^1.1.2", "eslint-loader": "^4.0.2", @@ -117,6 +119,7 @@ "jest-environment-node": "^26.6.2", "ncp": "^2.0.0", "node-loader": "^1.0.2", + "prettier": "^3.0.3", "replace-in-file": "5.0.2", "sass": "~1.32", "sass-loader": "^10.0.0", @@ -134,4 +137,4 @@ "electron-builder": "^23.0.0" }, "packageManager": "yarn@1.22.19" -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 507b04da..7ded6d43 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7010,6 +7010,11 @@ eslint-config-airbnb-base@^14.1.0: object.assign "^4.1.2" object.entries "^1.1.2" +eslint-config-prettier@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f" + integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== + eslint-friendly-formatter@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/eslint-friendly-formatter/-/eslint-friendly-formatter-4.0.1.tgz#27d504dc837f7caddbf201b2e84a4ee730ba3efa" @@ -13838,6 +13843,11 @@ prettier@^1.18.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +prettier@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" + integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== + pretty-error@^2.0.2: version "2.1.2" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.2.tgz#be89f82d81b1c86ec8fdfbc385045882727f93b6"