{"id":15658377,"url":"https://github.com/nfour/eslint-config-standard-typescript-prettier","last_synced_at":"2025-06-22T13:07:40.879Z","repository":{"id":42176942,"uuid":"249139270","full_name":"nfour/eslint-config-standard-typescript-prettier","owner":"nfour","description":"A simple eslint config for modern TypeScript projects.","archived":false,"fork":false,"pushed_at":"2022-07-05T06:53:28.000Z","size":199,"stargazers_count":22,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-05T06:26:16.295Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfour.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-22T08:06:36.000Z","updated_at":"2024-05-11T00:09:53.000Z","dependencies_parsed_at":"2022-09-07T18:21:12.577Z","dependency_job_id":null,"html_url":"https://github.com/nfour/eslint-config-standard-typescript-prettier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nfour/eslint-config-standard-typescript-prettier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Feslint-config-standard-typescript-prettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Feslint-config-standard-typescript-prettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Feslint-config-standard-typescript-prettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Feslint-config-standard-typescript-prettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfour","download_url":"https://codeload.github.com/nfour/eslint-config-standard-typescript-prettier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Feslint-config-standard-typescript-prettier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261296911,"owners_count":23137218,"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":[],"created_at":"2024-10-03T13:12:16.139Z","updated_at":"2025-06-22T13:07:35.862Z","avatar_url":"https://github.com/nfour.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eslint config: StandardJS, Typescript, Prettier\n\nA simple **eslint** config for modern **TypeScript** projects.\n\nThis package configures **eslint** with:\n- **Typescript** support https://github.com/typescript-eslint/typescript-eslint\n- **StandardJs** rules https://github.com/standard/eslint-config-standard\n- **Prettier** rules https://github.com/prettier/eslint-plugin-prettier\n- **`@typescript-eslint/recommended`** rules https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin\n- Requires semicolons (from prettier) for consistancy with types\n- Disables some opinionated type check rules\n\n\u003e For reference: [./eslint.js](./eslint.js).\n\n----------\n\n+ [1. Install](#1-install)\n+ [1.1 Install Peer Dependencies](#11-install-peer-dependencies)\n+ [2. Configure](#2-configure)\n+ [3. Bonus configure](#3-bonus-configure)\n+ [FAQ](#faq)\n  + [I want fine grained control](#i-want-fine-grained-control)\n  + [Eslint cant find my files](#eslint-cant-find-my-files)\n  + [I want linting to appear as warnings, not errors](#i-want-linting-to-appear-as-warnings-not-errors)\n+ [Project future](#project-future)\n+ [Potential issues](#potential-issues)\n\n-----------------\n\n## 1. Install\n\n\u003e Note: For an even \"easier\" install option, see [eslint-config-nfour](https://github.com/nfour/eslint-config-nfour)\n\n```sh\nyarn add -D eslint-config-standard-typescript-prettier\n```\n\n## 1.1 Install Peer Dependencies\n\nInstall all the peer dependencies listed in [this projects package.json](./package.json) into your project.\n\nThis should do the trick:\n\n```sh\nnpx install-peerdeps -o --dev --yarn eslint-config-standard-typescript-prettier\n```\n\n## 2. Configure\n\nAdd this to your `package.json`:\n\n```json\n\"eslintConfig\": {\n  \"extends\": [\"standard-typescript-prettier\"],\n  \"parserOptions\": { \"project\": \"./tsconfig.json\" }\n},\n\"prettier\": \"eslint-config-standard-typescript-prettier/prettier\"\n```\n\n\u003e For other config recipes, see [I want fine grained control](#I-want-fine-grained-control)\n\n## 3. Bonus configure\n\nAdd the comment below to get type checks on your rules in a `.eslintrc.js`\n\n\u003e /** @ts-check @type import('eslint-config-standard-typescript-prettier/types').TsEslintConfig */\n\n![](docs/vscodeTypes.png)\n\n## FAQ\n\n### I want fine grained control\n\nThe packages exports a plain object, go nuts!\n\nIn an `.eslintrc.js`:\n\n```js\nconst config = require('eslint-config-standard-typescript-prettier');\n\nmodule.exports = {\n  ...config,\n  parserOptions: { project: \"./tsconfig.json\" },\n  rules: {\n    ...config.rules,\n    \"@typescript-eslint/no-explicit-any\": \"error\",\n  },\n};\n```\n\n\u003e Eslint might be changing their config, which is why a `.eslintrc.js` format is recommended.\n\u003e \n\u003e More info: https://github.com/eslint/rfcs/pull/9\n\nIn a `.prettierrc.js`:\n\n```js\nmodule.exports = {\n  ...require('eslint-config-standard-typescript-prettier/prettier'),\n  semi: false, // This is how you turn off semicolons, by the way\n}\n```\n\n### Eslint cant find my files\n\nOn the CLI, `eslint` requires the `--ext` flag (currently):\n```\neslint --ext .ts,.tsx .\n```\n\n\n### I want linting to appear as warnings, not errors\n\nBy default, lint errors can become mixed with TypeScript errors during development.\n\n`eslint-plugin-only-warn` is already included in this package, so do this:\n\n```json\n{\n  \"plugins\": [\"only-warn\"],\n  \"extends\": [\"standard-typescript-prettier\"],\n  \"parserOptions\": { \"project\": \"./tsconfig.json\" }\n}\n```\n\nWant your lint warnings turned into errors?\n\n\u003e `yarn eslint --max-warnings 1`\n\n## Project future\n\nJavascript churn is real. This project will be kept up to date **only** for as long as configuration remains tedious.\n\n## Potential issues\n\nThe peerDependencies listed are versioned for compatibility. Because you maintain these dependencies in your project, you'll have to keep them all in sync or you could have issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfour%2Feslint-config-standard-typescript-prettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfour%2Feslint-config-standard-typescript-prettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfour%2Feslint-config-standard-typescript-prettier/lists"}