{"id":19561827,"url":"https://github.com/valantic/eslint-config-valantic","last_synced_at":"2025-07-27T00:35:30.030Z","repository":{"id":41081460,"uuid":"124849013","full_name":"valantic/eslint-config-valantic","owner":"valantic","description":"The default ESLint config of valantic.","archived":false,"fork":false,"pushed_at":"2025-02-13T11:55:15.000Z","size":776,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-19T19:05:02.959Z","etag":null,"topics":["airbnb-eslint","eslint","eslint-config","javascript","valantic"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valantic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","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":"2018-03-12T07:17:49.000Z","updated_at":"2025-02-13T11:47:41.000Z","dependencies_parsed_at":"2024-06-21T14:04:27.670Z","dependency_job_id":"5934ff54-0018-4bc1-b48e-06d1d25a5b51","html_url":"https://github.com/valantic/eslint-config-valantic","commit_stats":{"total_commits":216,"total_committers":9,"mean_commits":24.0,"dds":0.3842592592592593,"last_synced_commit":"fb8eb1fbc869efad66435a53815c37ba250a4c93"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Feslint-config-valantic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Feslint-config-valantic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Feslint-config-valantic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Feslint-config-valantic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valantic","download_url":"https://codeload.github.com/valantic/eslint-config-valantic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251072279,"owners_count":21532004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["airbnb-eslint","eslint","eslint-config","javascript","valantic"],"created_at":"2024-11-11T05:12:39.489Z","updated_at":"2025-07-27T00:35:30.023Z","avatar_url":"https://github.com/valantic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# valantic ESLint config\n\nTo ensure a high and consistent code quality for JavaScript and TypeScript we use ESLint.\n\n[http://eslint.org](http://eslint.org)\n\n## Code style\n\nAt valantic the JavaScript and TypeScript code style is based on the eslint-plugin-unicorn.\n\n[https://github.com/sindresorhus/eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)\n\nSee package.json for currently used version.\n\n### Exceptions\n\nWe've made some internal adjustments to the code style, to meet our daily needs. See the files inside `./rules/` to learn more about these adjustments.\n\n## ESLint version\n\nCheck the required ESLint version in the `package.json` file. To check for updates, see [http://eslint.org/blog/](http://eslint.org/blog/)\n\n## Install\n\nUse npm to install the ESLint config to your project.\n\n### Install current version\n\nCheck this repo for the different configs and install the plugins accordingly. (Vue, TypeScript, etc.)\n\n```\nnpm install eslint-config-valantic eslint eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-unicorn --save-dev\n```\n\n## Setup\n\nAfter installing the config package, you still need to create a `eslint.config.js` inside your project, where you tell ESLint to use the valantic config.\n\n```js\n// eslint.config.js\n\nimport eslintConfigValantic from 'eslint-config-valantic';\n\nexport default [\n  ...eslintConfigValantic,\n  rules: {\n    // Use for project specific settings\n  },\n];\n```\n\n### Vue support\n\nIf your project is based on Vue 3 with TypeScript you should use the vue config.\n\n```js\n// eslint.config.js\n\nimport eslintConfigValantic from 'eslint-config-valantic/vue.js';\n\nexport default [\n  ...eslintConfigValantic,\n  rules: {\n    // Use for project specific settings\n  },\n];\n```\n\n__NOTE: `@vue/typescript` is important. Else, TypeScript will not be able to parse *.vue files.__\n\n### TypeScript support\n\nIf your project uses TypeScript, you need to use some additional dependencies installed:\n\n```json\n{\n  \"devDependencies\": {\n    \"typescript-eslint\": \"~8.31.0\",\n  }\n}\n```\n\nand set the correct config that should be extended.\n\n```js\n// eslint.config.js\nimport eslintConfigValantic from 'eslint-config-valantic/typescript.js';\n\nexport default [\n  ...eslintConfigValantic,\n  rules: {\n    // Use for project specific settings\n  },\n];\n\n```\n\n### `--fix`\n\n\u003e [!WARNING]\n\u003e This block has not been tested since the update of eslint 9.\n\nThere is a special config if you want to use auto code styling and the `--fix` command. It is recommended to use this extended definition if you plan to use `--fix`.\n\n1. Add a new `.eslintrc.fix.js` to your project that extends the \"fix\" configuration. It would also be possible to define or adjust additonal rules here.\n\n```js\n// https://eslint.org/docs/user-guide/configuring\nimport eslintConfigValantic from 'eslint-config-valantic/fix.js';\n\nexport default [\n  ...eslintConfigValantic,\n  rules: {\n    // Use for project specific settings\n  },\n];\n```\n\n2. Add a new NPM script in `package.json`.\n\n**NOTE: The file loaded by `--config` in the `eslint:fix` script will EXTEND the basic configuration, NOT replace it!\n\n```json\n{\n  \"lint:eslint\": \"eslint ./\",\n  \"fix:eslint\": \"npm run lint:eslint -- --config .eslintrc.fix.js --cache=false --fix\"\n}\n```\n\n3. Extend GIT hooks\n\nFinally, update the `lint-staged` configuration to apply auto code styling on commit.\n\n```json\n{\n  \"lint-staged\": \"lint-staged\",\n}\n```\n\n## Use\n\nNow you are ready to enable ESLint in your editor or use it on the command line!\n\n### PhpStorm\n\nGo to `PhpStorm \u003e Preferences` and search for ESLint or navigate to `Languages \u0026 Frameworks \u003e JavaScript \u003e Code Quality Tools \u003e ESLint` and enable ESLint. Make sure you set the `ESLint package` to the one in your `node_modules` folder. Else the global ESLint will be used and won't be able to find the `valantic` config.\n\n### Console\n\nYou can also lint your code from the console. To do this, add a script to your `package.json`.\n\n```json\n{\n  \"scripts\": {\n    \"eslint\": \"eslint\"\n  }\n}\n```\n\nNow you can execute the linter with the following command.\n\n```shell\nnpm run eslint \u003capp|file.js\u003e\n```\n\nNOTE: don't use the `$ eslint` command, since this will call the global ESLint package, which will not be able to find the valantic config inside your project!\n\n## Rule hints\n\n#### valid-jsdoc and PhpStorm\n\nIn case your PhpStorm is using `@return` instead of the required `@returns`: Write the return tag yourself for once and select the correct type from the suggestion list. PhpStorm will keep your last preference and use it from now on. See also https://youtrack.jetbrains.com/issue/WEB-7516#comment=27-611256\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalantic%2Feslint-config-valantic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalantic%2Feslint-config-valantic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalantic%2Feslint-config-valantic/lists"}