The minimalistic document archiving platform.
docs(CONTRIBUTING): add IDE setup instructions for ESLint in VS Code (#502)
Corentin Thomasset947bdf838547
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 278cb4c5..06ba6eb0 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -105,6 +105,73 @@ We recommend running the app locally for development. Follow these steps:6. Open your browser and navigate to `http://localhost:3000`.+### IDE Setup++#### ESLint Extension++We recommend installing the [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) for VS Code to get real-time linting feedback and automatic code fixing.+The linting configuration is based on [@antfu/eslint-config](https://github.com/antfu/eslint-config), you can find specific IDE configurations in their repository.++<details>+<summary>Recommended VS Code Settings</summary>++Create or update your `.vscode/settings.json` file with the following configuration:++```json+{+ // Disable the default formatter, use eslint instead+ "prettier.enable": false,+ "editor.formatOnSave": false,++ // Auto fix+ "editor.codeActionsOnSave": {+ "source.fixAll.eslint": "explicit",+ "source.organizeImports": "never"+ },++ // Silent the stylistic rules in your IDE, but still auto fix them+ "eslint.rules.customizations": [+ { "rule": "style/*", "severity": "off", "fixable": true },+ { "rule": "format/*", "severity": "off", "fixable": true },+ { "rule": "*-indent", "severity": "off", "fixable": true },+ { "rule": "*-spacing", "severity": "off", "fixable": true },+ { "rule": "*-spaces", "severity": "off", "fixable": true },+ { "rule": "*-order", "severity": "off", "fixable": true },+ { "rule": "*-dangle", "severity": "off", "fixable": true },+ { "rule": "*-newline", "severity": "off", "fixable": true },+ { "rule": "*quotes", "severity": "off", "fixable": true },+ { "rule": "*semi", "severity": "off", "fixable": true }+ ],++ // Enable eslint for all supported languages+ "eslint.validate": [+ "javascript",+ "javascriptreact",+ "typescript",+ "typescriptreact",+ "vue",+ "html",+ "markdown",+ "json",+ "jsonc",+ "yaml",+ "toml",+ "xml",+ "gql",+ "graphql",+ "astro",+ "svelte",+ "css",+ "less",+ "scss",+ "pcss",+ "postcss"+ ]+}+```++</details>+### TestingWe use **Vitest** for testing. Each package comes with its own testing commands.