From 485b9871f62fd9d32e71a52f868590bb1f5d95d7 Mon Sep 17 00:00:00 2001 From: Aaron Zielstorff Date: Thu, 8 Aug 2024 08:11:09 +0000 Subject: [PATCH] Includes prettier in eslint config --- frontend/aashub/eslint.config.mjs | 15 +++++++++++++++ frontend/aashub/package.json | 7 ++++--- frontend/aashub/yarn.lock | 12 ++---------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/frontend/aashub/eslint.config.mjs b/frontend/aashub/eslint.config.mjs index 7dcd687..5bace31 100644 --- a/frontend/aashub/eslint.config.mjs +++ b/frontend/aashub/eslint.config.mjs @@ -1,4 +1,6 @@ import js from '@eslint/js'; +import eslintConfigPrettier from 'eslint-config-prettier'; +import prettier from 'eslint-plugin-prettier'; import pluginPromise from 'eslint-plugin-promise'; import simpleImportSort from 'eslint-plugin-simple-import-sort'; import vue from 'eslint-plugin-vue'; @@ -73,4 +75,17 @@ export default [ // Promise pluginPromise.configs['flat/recommended'], + + // Prettier + { + plugins: { + prettier, + }, + rules: { + 'prettier/prettier': 'error', + }, + }, + + // Disable rules that conflict with Prettier + eslintConfigPrettier, ]; diff --git a/frontend/aashub/package.json b/frontend/aashub/package.json index 15f22be..b8dbf4f 100644 --- a/frontend/aashub/package.json +++ b/frontend/aashub/package.json @@ -20,18 +20,19 @@ "@types/eslint__js": "^8.42.3", "@types/node": "^22.1.0", "@vitejs/plugin-vue": "^5.0.5", - "@vue/eslint-config-prettier": "^9.0.0", - "typescript-eslint": "^8.0.0", "@vue/tsconfig": "^0.5.1", "eslint": "^9.8.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-promise": "^7.0.0", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-vue": "^9.27.0", - "pinia": "^2.2.1", "globals": "^15.9.0", + "pinia": "^2.2.1", "prettier": "^3.3.3", "sass": "1.77.8", "typescript": "^5.4.2", + "typescript-eslint": "^8.0.0", "unplugin-fonts": "^1.1.1", "unplugin-vue-components": "^0.27.2", "vite": "^5.3.3", diff --git a/frontend/aashub/yarn.lock b/frontend/aashub/yarn.lock index 5768d35..4e6c7fb 100644 --- a/frontend/aashub/yarn.lock +++ b/frontend/aashub/yarn.lock @@ -539,14 +539,6 @@ resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.6.3.tgz#b23a588154cba8986bba82b6e1d0248bde3fd1a0" integrity sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw== -"@vue/eslint-config-prettier@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@vue/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#f63394f8f7759d92b6ef3f3e1d30ff6b0c0b97c1" - integrity sha512-z1ZIAAUS9pKzo/ANEfd2sO+v2IUalz7cM/cTLOZ7vRFOPk5/xuRKQteOu1DErFLAh/lYGXMVZ0IfYKlyInuDVg== - dependencies: - eslint-config-prettier "^9.0.0" - eslint-plugin-prettier "^5.0.0" - "@vue/language-core@2.0.29": version "2.0.29" resolved "https://registry.yarnpkg.com/@vue/language-core/-/language-core-2.0.29.tgz#19462d786cd7a1c21dbe575b46970a57094e0357" @@ -835,12 +827,12 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^9.0.0: +eslint-config-prettier@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== -eslint-plugin-prettier@^5.0.0: +eslint-plugin-prettier@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz#d1c8f972d8f60e414c25465c163d16f209411f95" integrity sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==