From 4f297a769b2232fe948fa9a2f63d3495f143afc1 Mon Sep 17 00:00:00 2001 From: Martin Litvaj Date: Sun, 17 Dec 2023 13:45:08 +0100 Subject: [PATCH] Fix Prettier config --- .prettierrc | 5 +++++ .prettierrc.js | 6 ------ DOCS.md | 4 ++-- package-lock.json | 24 ++++++++++++------------ package.json | 4 ++-- 5 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 .prettierrc delete mode 100644 .prettierrc.js diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..30bd83a2 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "plugins": ["prettier-plugin-packagejson"], + "printWidth": 100, + "singleQuote": true +} diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index 59759b0c..00000000 --- a/.prettierrc.js +++ /dev/null @@ -1,6 +0,0 @@ -/** @type {import("prettier").Config} */ -export default { - plugins: ['prettier-plugin-packagejson'], - printWidth: 100, - singleQuote: true, -}; diff --git a/DOCS.md b/DOCS.md index 3b3c3ff8..d319d250 100644 --- a/DOCS.md +++ b/DOCS.md @@ -115,7 +115,7 @@ ESLint runs when: ### Prettier -Formatting of the entire codebase (js(x), ts(x), json, html, css, md...) is covered by [Prettier](https://prettier.io/docs/en/index.html). Prettier is an opinionated code formatter which removes original styling and ensures that outputted code conforms to a consistent style. This project uses mostly default Prettier configuration with a small exception defined in [.prettierrc.js](./.prettierrc.js). You can read more about it here: [Why Prettier](https://prettier.io/docs/en/why-prettier.html) and [Editors Integration](https://prettier.io/docs/en/editors.html). +Formatting of the entire codebase (js(x), ts(x), json, html, css, md...) is covered by [Prettier](https://prettier.io/docs/en/index.html). Prettier is an opinionated code formatter which removes original styling and ensures that outputted code conforms to a consistent style. This project uses mostly default Prettier configuration with a small exception defined in [.prettierrc](./.prettierrc). You can read more about it here: [Why Prettier](https://prettier.io/docs/en/why-prettier.html) and [Editors Integration](https://prettier.io/docs/en/editors.html). On top of there, there is a [prettier-plugin-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson) to sort the keys of a `package.json`` file using [sort-package-json](https://github.com/keithamus/sort-package-json). @@ -280,7 +280,7 @@ The best part is that developers can [build their own](https://react.dev/learn/r ├── .gitignore : to keep Git from tracking specific files ├── .npmrc : an NPM [config](https://docs.npmjs.com/cli/using-npm/config) ├── .prettierignore : to ignore files when running Prettier -├── .prettierrc.js : contains Prettier [configuration](https://prettier.io/docs/en/options.html) +├── .prettierrc : contains Prettier [configuration](https://prettier.io/docs/en/options.html) ├── i18next-parser.config.ts : contains configuration for [i18next-parser](https://github.com/i18next/i18next-parser) ├── index.html : is the entry point to the application ├── package.json : holds metadata about the project and its dependencies diff --git a/package-lock.json b/package-lock.json index 025a464d..2fbc8607 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,12 +49,12 @@ "@tsconfig/vite-react": "3.0.0", "@types/node": "20.10.4", "@types/react": "18.2.45", - "@types/react-dom": "18.2.17", + "@types/react-dom": "18.2.18", "@typescript-eslint/eslint-plugin": "6.14.0", "@typescript-eslint/parser": "6.14.0", "@vitejs/plugin-react-swc": "3.5.0", "@vitest/ui": "1.0.4", - "eslint": "8.55.0", + "eslint": "8.56.0", "eslint-config-prettier": "9.1.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:eslint-plugin-i@2.29.0", @@ -1259,9 +1259,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2927,9 +2927,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.17", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz", - "integrity": "sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==", + "version": "18.2.18", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", + "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", "dev": true, "dependencies": { "@types/react": "*" @@ -5761,15 +5761,15 @@ } }, "node_modules/eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", diff --git a/package.json b/package.json index 1e7acbce..74a1f178 100644 --- a/package.json +++ b/package.json @@ -76,12 +76,12 @@ "@tsconfig/vite-react": "3.0.0", "@types/node": "20.10.4", "@types/react": "18.2.45", - "@types/react-dom": "18.2.17", + "@types/react-dom": "18.2.18", "@typescript-eslint/eslint-plugin": "6.14.0", "@typescript-eslint/parser": "6.14.0", "@vitejs/plugin-react-swc": "3.5.0", "@vitest/ui": "1.0.4", - "eslint": "8.55.0", + "eslint": "8.56.0", "eslint-config-prettier": "9.1.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "npm:eslint-plugin-i@2.29.0",