{"id":50915282,"url":"https://github.com/maximization/eslint-config-async","last_synced_at":"2026-06-16T14:02:17.882Z","repository":{"id":50685889,"uuid":"473377919","full_name":"Maximization/eslint-config-async","owner":"Maximization","description":"A shareable ESLint config for writing better asynchronous code","archived":false,"fork":false,"pushed_at":"2025-11-14T06:02:09.000Z","size":454,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T02:37:56.370Z","etag":null,"topics":["asynchronous","eslint","eslintconfig","javascript","nodejs","npm"],"latest_commit_sha":null,"homepage":"","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/Maximization.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-23T22:27:30.000Z","updated_at":"2025-11-14T06:02:13.000Z","dependencies_parsed_at":"2024-06-19T05:29:14.559Z","dependency_job_id":"da742f37-eb8f-4a49-9da1-61f00dc63f31","html_url":"https://github.com/Maximization/eslint-config-async","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"22080a999ba3ed366f3f2cf0848dd85e8bf388f1"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Maximization/eslint-config-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maximization%2Feslint-config-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maximization%2Feslint-config-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maximization%2Feslint-config-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maximization%2Feslint-config-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maximization","download_url":"https://codeload.github.com/Maximization/eslint-config-async/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maximization%2Feslint-config-async/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34408788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":["asynchronous","eslint","eslintconfig","javascript","nodejs","npm"],"created_at":"2026-06-16T14:02:16.876Z","updated_at":"2026-06-16T14:02:17.866Z","avatar_url":"https://github.com/Maximization.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-config-async\n\nA shareable ESLint config for writing better asynchronous code.\n\nFind an overview of what rules are enabled, and why, in this article:\n\n📚 [**14 Linting Rules To Help You Write Asynchronous Code in JavaScript**](https://maximorlov.com/linting-rules-for-asynchronous-code-in-javascript/)\n\n## Table of contents\n\n- [Table of contents](#table-of-contents)\n- [Requirements](#requirements)\n- [Installation \\\u0026 usage](#installation--usage)\n  - [Non-TypeScript users](#non-typescript-users)\n  - [TypeScript users](#typescript-users)\n- [Migrating from v2 to v3](#migrating-from-v2-to-v3)\n- [Migrating from v1 to v2](#migrating-from-v1-to-v2)\n\n## Requirements\n\n- ESLint v9\n- Node.js ^18.18.0, ^20.9.0, or \u003e=21.1.0 (set by ESLint v9)\n\nIf you're using ESLint v8, you should use v2 of this library. [Installation \u0026 usage for eslint-config-async v2](https://github.com/Maximization/eslint-config-async/blob/v2.0.3/README.md).\n\n## Installation \u0026 usage\n\n### Non-TypeScript users\nInstall this package and ESLint:\n\n```shell\nnpm install --save-dev eslint eslint-config-async\n```\n\nIn your `eslint.config.js` configuration file:\n\n```js\nconst asyncConfig = require(\"eslint-config-async\");\n\nmodule.exports = [\n  ...asyncConfig.base, // enable base rules\n  ...asyncConfig.node, // enable Node.js specific rules (recommended)\n];\n```\n\n### TypeScript users\nInstall this package and its peer dependencies:\n\n```shell\nnpm install --save-dev eslint eslint-config-async typescript typescript-eslint\n```\n\nIn your `eslint.config.js` configuration file:\n\n```js\nconst tseslint = require(\"typescript-eslint\");\nconst asyncConfig = require(\"eslint-config-async\");\n\nmodule.exports = [\n  // One of tseslint configs must be enabled\n  // Either the base config\n  tseslint.configs.base, // adds the parser only, without any rules\n  // or\n  ...tseslint.configs.recommended, // includes base + a list of recommended rules\n  // ..and others\n\n  ...asyncConfig.base, // enable base rules\n  ...asyncConfig.node, // enable Node.js specific rules (recommended)\n  ...asyncConfig.typescript, // enable TypeScript specific rules\n  {\n    files: [\"*.ts\"], // tell ESLint to include TypeScript files\n    languageOptions: {\n      parserOptions: {\n        projectService: true,\n        tsconfigRootDir: __dirname,\n      },\n    },\n  },\n];\n```\n\n## Migrating from v2 to v3\n\nVersion 3 upgrades ESLint to v9. ESLint uses a [flat configuration file](https://eslint.org/docs/latest/use/configure/configuration-files). `.eslintrc.*` has been deprecated and you should rename it to `eslint.config.js` (or .cjs, .mjs):\n\n```diff\n- .eslintrc\n+ eslint.config.js\n```\n\nIn your `eslint.config.js` file, make the following changes:\n\n```diff\n- module.exports = {\n-   plugins: [\n-     'eslint-plugin-node'\n-   ],\n-   extends: [\n-     'async',\n-     'async/node'\n-   ],\n- };\n+ const asyncConfig = require(\"eslint-config-async\");\n+\n+ module.exports = [\n+   ...asyncConfig.base, // enable base rules\n+   ...asyncConfig.node, // enable Node.js specific rules (recommended)\n+ ];\n```\n\n`eslint-plugin-node` is no longer maintained and has been replaced with its fork, `eslint-plugin-n`. `eslint-plugin-n` is not a peer dependency and is included with this library, therefore you no longer need to install it separately:\n\n```shell\nnpm remove --save-dev eslint-plugin-node\n```\n\nFor TypeScript users, change the contents of `eslint.config.js` file as follows:\n\n```diff\n- module.exports = {\n-   plugins: [\n-     'eslint-plugin-node',\n-     '@typescript-eslint'\n-   ],\n-   extends: [\n-     'async',\n-     'async/node',\n-     'async/typescript'\n-   ],\n-   parser: '@typescript-eslint/parser',\n-   parserOptions: {\n-     tsconfigRootDir: __dirname,\n-     project: ['./tsconfig.json'],\n-   }\n- };\n\n+ const tseslint = require(\"typescript-eslint\");\n+ const asyncConfig = require(\"eslint-config-async\");\n+\n+ module.exports = [\n+   tseslint.configs.base,\n+   ...asyncConfig.base, // enable base rules\n+   ...asyncConfig.node, // enable Node.js specific rules (recommended)\n+   ...asyncConfig.typescript, // enable TypeScript specific rules\n+   {\n+     files: [\"*.ts\"], // tell ESLint to include TypeScript files\n+     languageOptions: {\n+       parserOptions: {\n+         projectService: true,\n+         tsconfigRootDir: __dirname,\n+       },\n+     },\n+   },\n+ ];\n```\n\nReplace `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` with `typescript-eslint`:\n\n```shell\nnpm remove @typescript-eslint/parser @typescript-eslint/eslint-plugin \u0026\u0026 npm install --save-dev typescript-eslint\n```\n\n## Migrating from v1 to v2\n\nVersion 2 adds TypeScript specific rules and exports multiple configs, namely:\n\n- Base rules (`eslint-config-async`)\n- Node.js specific rules (`eslint-config-async/node`)\n- TypeScript rules (`eslint-config-async/typescript`)\n\nIn version 1, the base and Node.js specific rules were included by default. In version 2, you need to explicitly add the Node.js rules:\n\n```diff\nmodule.exports = {\n  extends: [\n-   'eslint-config-async'\n+   'eslint-config-async',\n+   'eslint-config-async/node'\n  ],\n}\n```\n\nOr using the short syntax:\n\n```diff\nmodule.exports = {\n  extends: [\n-   'eslint-config-async'\n+   'async',\n+   'async/node'\n  ],\n}\n```\n\nIf you added the TypeScript specific rules manually in your project, you can remove them and replace them with this config:\n\n```diff\nmodule.exports = {\n  extends: [\n    'async',\n    'async/node',\n+   'async/typescript'\n  ],\n  rules: {\n-   \"@typescript-eslint/await-thenable\": \"error\",\n-   \"@typescript-eslint/no-floating-promises\": \"error\",\n-   \"@typescript-eslint/no-misused-promises\": \"error\",\n-   \"@typescript-eslint/promise-function-async\": \"error\",\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximization%2Feslint-config-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximization%2Feslint-config-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximization%2Feslint-config-async/lists"}