{"id":26158659,"url":"https://github.com/jvalue/eslint-config-jvalue","last_synced_at":"2026-04-19T08:32:39.750Z","repository":{"id":37970325,"uuid":"400162937","full_name":"jvalue/eslint-config-jvalue","owner":"jvalue","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-18T07:18:40.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-05T13:06:26.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jvalue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-26T12:36:13.000Z","updated_at":"2021-10-01T09:26:27.000Z","dependencies_parsed_at":"2024-11-19T04:55:55.540Z","dependency_job_id":null,"html_url":"https://github.com/jvalue/eslint-config-jvalue","commit_stats":{"total_commits":36,"total_committers":7,"mean_commits":5.142857142857143,"dds":0.5277777777777778,"last_synced_commit":"7d230cd57706d68ee8eb8994abaae0b0852be987"},"previous_names":["jvalue/jvalue-eslint"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jvalue/eslint-config-jvalue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvalue%2Feslint-config-jvalue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvalue%2Feslint-config-jvalue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvalue%2Feslint-config-jvalue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvalue%2Feslint-config-jvalue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvalue","download_url":"https://codeload.github.com/jvalue/eslint-config-jvalue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvalue%2Feslint-config-jvalue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32000258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T10:59:13.504Z","updated_at":"2026-04-19T08:32:39.730Z","avatar_url":"https://github.com/jvalue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESLint Config JValue\n\nThe eslint config reused across JValue projects.\n\nOur general goals of linting are:\n\n- Avoiding common code errors\n- Improving the overall type safety\n- Having uniform code formatting\n- Avoiding unnecessary code complexity\n\nFurthermore, we strive to avoid rules that are overly restrictive and do not contribute to the goals above.\n\n## How to use\n\nYou essentially need to perform the following steps (they will be explained in more detail in the following sections):\n\n1. Install this package\n2. Install required additional packages\n3. Create a `.prettierrc.js` file\n4. Create a `.eslintrc.js` file\n5. Extend your `tsconfig.json` file\n\n### Install this package\n\nTo install this package, simply run `npm install --save-dev @jvalue/eslint-config-jvalue`.\n\n### Install required additional packages\n\nThis package provides three configs: One for plain TypeScript projects, one for Vue+TypeScript and one for React+TypeScript. Depending on which project you are working on, you need to install the following additional npm packages as devDependencies (i.e. using the `--save-dev` flag):\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eProject type\u003c/th\u003e\n      \u003cth\u003eRequired packages\u003c/th\u003e\n    \u003c/tr\u003e    \n  \u003c/thead\u003e\n\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eTypeScript only\u003c/td\u003e\n      \u003ctd\u003e\n        \u003cul\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/@typescript-eslint/eslint-plugin\"\u003e@typescript-eslint/eslint-plugin\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/@typescript-eslint/parser\"\u003e@typescript-eslint/parser\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/eslint\"\u003eeslint\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/eslint-config-prettier\"\u003eeslint-config-prettier\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/eslint-plugin-import\"\u003eeslint-plugin-import\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/eslint-plugin-prettier\"\u003eeslint-plugin-prettier\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/prettier\"\u003eprettier\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        For copy-and-paste:\n        \u003ccode\u003enpm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier\u003c/code\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eVue+TypeScript\u003c/td\u003e\n      \u003ctd\u003e\n        You need the same packages as in the \"TypeScript only\" config, plus:\n        \u003cul\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/@vue/cli-plugin-eslint\"\u003e@vue/cli-plugin-eslint\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/@vue/eslint-config-typescript\"\u003e@vue/eslint-config-typescript\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/eslint-plugin-vue\"\u003eeslint-plugin-vue\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        For copy-and-paste:\n        \u003ccode\u003enpm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier @vue/cli-plugin-eslint @vue/eslint-config-typescript eslint-plugin-vue\u003c/code\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eReact+TypeScript\u003c/td\u003e\n      \u003ctd\u003e\n        Are you using Create-React-App? Then you only need the following packages:\n        \u003cul\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/eslint-config-prettier\"\u003eeslint-config-prettier\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/eslint-plugin-prettier\"\u003eeslint-plugin-prettier\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/prettier\"\u003eprettier\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        For copy-and-paste:\n        \u003ccode\u003enpm install --save-dev eslint-config-prettier eslint-plugin-prettier prettier\u003c/code\u003e\n        \u003cbr\u003e\u003cbr\u003e\n        \u003cblockquote\u003e\n          If you are not using Create-React-App, then you additionally need to install \u003ca href=\"https://www.npmjs.com/package/eslint-config-react-app\"\u003eeslint-config-react-app\u003c/a\u003e.\n        \u003c/blockquote\u003e        \n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003e The list of packages you need may change in the future. We recommend you take a look at this list (and the release notes) whenever you upgrade to a newer version of `@jvalue/eslint-config-jvalue`.\n\n### Create a `.prettierrc.js` file\n\nAfter you have installed all packages, create a `.prettierrc.js` file with the following content:\n\n```js\nmodule.exports = require('@jvalue/eslint-config-jvalue/.prettierrc.js');\n```\n\n### Create a `.eslintrc.js` file\n\nFinally, you need to create a `.eslintrc.js` file. Again, we distinguish plain TypeScript projects, projects using Vue+TypeScript, and projects using React+TypeScript.\n\n#### File content for plain TypeScript projects\n\n```js\nmodule.exports = {\n  extends: '@jvalue/eslint-config-jvalue',\n};\n```\n\n#### File content for Vue+TypeScript projects\n\n```js\nmodule.exports = {\n  extends: '@jvalue/eslint-config-jvalue/vue',\n};\n```\n\n#### File content for React+TypeScript projects\n\n```js\nmodule.exports = {\n  extends: '@jvalue/eslint-config-jvalue/react',\n};\n```\n\n### Extend your `tsconfig.json` file\n\nFinally, it is highly recommended that you add the following settings to the `compilerOptions` section of your `tsconfig.json` file:\n\n```\n\"strict\": true,\n\"noImplicitOverride\": true,\n\"noUncheckedIndexedAccess\": true,\n\"exactOptionalPropertyTypes\": true,\n\"noFallthroughCasesInSwitch\": true,\n```\n\nNow, you can finally start linting your project.\n\n## Tips and tricks\n\n### Overriding rules\n\nIn some cases, certain linter rules are not suitable for your project. Or, you want to use an additional rule. You can easily override certain rules in your `.eslintrc.js` using the `overrides` section in `.eslintrc.js`. An example:\n\n```js\nmodule.exports = {\n  extends: '@jvalue/eslint-config-jvalue',\n  overrides: [\n    {\n      files: ['*.ts'],\n      rules: {\n        'capitalized-comments': 'off',\n      },\n    },\n  ],\n};\n```\n\nHere, rule `capitalized-comments` is turned off for all `.ts` files.\n\n### npm script\n\nIn a TypeScript or React+TypeScript project, add the following to the `scripts` section of your `package.json`:\n\n```\n\"lint\": \"eslint src --max-warnings=0\"\n```\n\nNow, when running `npm run lint`, your project files will get linted. (We assume that your project files are all stored in folder `src/`).\n\nIn a Vue+TypeScript project, use the following instead:\n\n```\n\"lint\": \"vue-cli-service lint --no-fix --max-warnings=0\"\n```\n\n### VSCode extensions\n\nIf you are using VSCode, we recommend installing the following extensions:\n\n- [vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n- [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)\n\n### VSCode auto formatting\n\nWhen developing, you often don't want to spend time manually formatting your code. If you are using VSCode, you can automate this process. Create a new file `.vscode/settings.json` and paste the following:\n\n\u003cdetails\u003e\n\n```json\n{\n  \"eslint.validate\": [\"typescript\"],\n  \"typescript.preferences.importModuleSpecifier\": \"relative\",\n  \"[css]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n  },\n  \"[javascript]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n  },\n  \"[json]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n  },\n  \"[jsonc]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n  },\n  \"[markdown]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n  },\n  \"[scss]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n  },\n  \"[typescript]\": {\n    \"editor.formatOnSave\": false,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n    \"editor.codeActionsOnSave\": [\"source.fixAll.format\", \"source.fixAll.eslint\"]\n  },\n  \"[typescriptreact]\": {\n    \"editor.formatOnSave\": false,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n    \"editor.codeActionsOnSave\": [\"source.fixAll.format\", \"source.fixAll.eslint\"]\n  },\n  \"[vue]\": {\n    \"editor.formatOnSave\": false,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n    \"editor.codeActionsOnSave\": [\"source.fixAll.format\", \"source.fixAll.eslint\"]\n  }\n}\n```\n\n\u003c/details\u003e\n\nNow, whenever you save a file, all automatically fixable linter errors will be fixed.\n\n## Development\n\nThis section contains information regarding the development of this package. If you are only intending to use this package, but not to make changes to it, then you can skip this section.\n\n### File structure\n\nThere are three files where our configs are stored: `index.js`, `react.js`, and `vue.js`. When a developer uses this package and writes `extends: '@jvalue/eslint-config-jvalue'`, then the index file is loaded. When using `extends: '@jvalue/eslint-config-jvalue/react'` or `extends: '@jvalue/eslint-config-jvalue/vue'`, the config found in `react.js` or `vue.js` is loaded.\n\nYou will notice that the rules found in these three files are in many places just copies (i.e. the list of rules in `index.js` is very similar to `react.js` and `vue.js`). This is mostly done to simplify the structure of this project. If you add a new rule, you probably need to add it to all three configs.\n\n### Testing\n\nBefore publishing a new config, it is highly recommended that you test it in a project to determine if the config really matches your expectations. A suggestion: Create a new TypeScript/React/Vue project in a directory outside of `eslint-config-jvalue`. Here, you can import your local eslint config and test if it works properly.\n\nTo import the eslint config, you could simply symlink `eslint-config-jvalue` in your `package.json` using something like `\"@jvalue/eslint-config-jvalue\": \"file:../(path-to-the-eslint-config-folder)\"` as a devDependency. However, this might lead to issues in some setups. Instead, and in order to better predict the actual package structure, it is recommended to do the following:\n\n1. In the `eslint-config-jvalue` folder, run `npm pack`. This will create a `.tgz` file.\n2. In your test project, run `npm install --save-dev ../(path-to-the-eslint-config-folder)/the-tgz-file.tgz` (substituting `(path-to-the-eslint-config-folder)` with the actual path, and `the-tgz-file.tgz` with the name of the file created in the previous step)\n3. Now, you can use this package like an external package and test whether it fulfills your expectations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvalue%2Feslint-config-jvalue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvalue%2Feslint-config-jvalue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvalue%2Feslint-config-jvalue/lists"}