{"id":19489,"library":"eslint-config-async","title":"eslint-config-async","description":"A shareable ESLint config (v3.1.0) for writing better asynchronous JavaScript and TypeScript code. It provides a curated set of rules to avoid common async pitfalls (e.g., unhandled promises, missing await, improper error handling) based on the author's article. Requires ESLint v9 and Node.js ^18.18.0 || ^20.9.0 || >=21.1.0. Key differentiators: focused solely on async patterns, built-in TypeScript support via typescript-eslint, and flat config only (no .eslintrc support in v3).","status":"active","version":"3.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/Maximization/eslint-config-async","tags":["javascript","eslint","eslintconfig"],"install":[{"cmd":"npm install eslint-config-async","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-async","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-async","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; v9^ required by v3.","package":"eslint","optional":false},{"reason":"Optional peer dependency; required only for TypeScript users.","package":"typescript","optional":true},{"reason":"Peer dependency; v8^ required for TypeScript configs.","package":"typescript-eslint","optional":true}],"imports":[{"note":"v3 uses flat config only; array spread required. For ESM, use import asyncConfig from 'eslint-config-async'.","wrong":"module.exports = { extends: ['async'] }","symbol":"base","correct":"const asyncConfig = require('eslint-config-async'); module.exports = [ ...asyncConfig.base ];"},{"note":"Node-specific rules are recommended for server-side code.","wrong":"module.exports = { extends: ['async/node'] }","symbol":"node","correct":"const asyncConfig = require('eslint-config-async'); module.exports = [ ...asyncConfig.node ];"},{"note":"Requires typescript-eslint config to be applied first (e.g., tseslint.configs.base).","wrong":"module.exports = { extends: ['async/typescript'] }","symbol":"typescript","correct":"const asyncConfig = require('eslint-config-async'); module.exports = [ ...asyncConfig.typescript ];"}],"quickstart":{"code":"// eslint.config.js\nconst asyncConfig = require('eslint-config-async');\n\nmodule.exports = [\n  ...asyncConfig.base,\n  ...asyncConfig.node,\n  {\n    rules: {\n      'no-console': 'warn',\n    },\n  },\n];","lang":"javascript","description":"Sets up ESLint with async base and Node rules using flat config. Assumes ESLint v9 is installed."},"warnings":[{"fix":"Migrate to eslint.config.js and use the array-based flat config syntax shown in the README.","message":"v3 requires ESLint v9 and flat config (.eslintrc.* not supported).","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Remove eslint-plugin-node from devDependencies; eslint-config-async now includes eslint-plugin-n.","message":"v3 replaces eslint-config-node (unmaintained) with eslint-config-n and moves it from peer to direct dependency.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use named exports: asyncConfig.base, asyncConfig.node, asyncConfig.typescript.","message":"v3 merges multiple config files into a single file with named exports; old extends patterns fail.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Install typescript-eslint and use tseslint.configs.base instead of parser/plugin.","message":"v2 to v3: typescript-eslint v8 replaces @typescript-eslint/parser and @typescript-eslint/eslint-plugin.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Only spread asyncConfig.typescript if you have TypeScript and typescript-eslint installed.","message":"Non-TypeScript users must not use asyncConfig.typescript; it will cause errors without typescript-eslint.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Include tseslint.configs.base in the config array before asyncConfig.typescript.","message":"TypeScript users must apply a tseslint config (e.g., tseslint.configs.base) before asyncConfig.typescript.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install --save-dev eslint-config-async","cause":"Package not installed or incorrect import path.","error":"Error: Cannot find module 'eslint-config-async'"},{"fix":"Use import asyncConfig from 'eslint-config-async' or rename file to .cjs.","cause":"Using require() in an ESM project or wrong config file extension.","error":"Require of ES Module eslint-config-async not supported."},{"fix":"Upgrade to eslint-config-async@3.1.0 which removed 'no-return-await'.","cause":"Using an old eslint-config-async version with ESLint v9 which removed the rule.","error":"Configuration for rule 'no-return-await' is invalid: Value 'error' is the wrong type."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}