{"id":25492,"library":"eslint-config-typed","title":"ESLint Config Typed","description":"eslint-config-typed (v4.9.6) is a comprehensive, fully typed ESLint configuration package for the modern flat config system. It provides strongly-typed rule definitions, pre-configured setups for TypeScript, React, Preact, Vitest, Jest, and Playwright, and custom ESLint plugins (ts-restrictions, vitest-coding-style, react-coding-style). Requires ESLint >=9 and TypeScript >=5. Actively maintained with weekly releases. Differentiators: type-safe rule options, TypeScript config support, and built-in custom rules not found in other config packages.","status":"active","version":"4.9.6","language":"javascript","source_language":"en","source_url":"https://github.com/noshiro-pf/eslint-config-typed","tags":["javascript","typescript"],"install":[{"cmd":"npm install eslint-config-typed","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-typed","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-typed","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency — ESLint 9+ flat config is required.","package":"eslint","optional":true},{"reason":"Peer dependency — TypeScript 5+ required for TypeScript configurations.","package":"typescript","optional":true}],"imports":[{"note":"ESM-only since v4. Requires ESLint flat config. CommonJS require() will fail.","wrong":"const defineConfig = require('eslint-config-typed')","symbol":"defineConfig","correct":"import { defineConfig } from 'eslint-config-typed'"},{"note":"Function that returns a flat config array for TypeScript projects.","symbol":"eslintConfigForTypeScript","correct":"import { eslintConfigForTypeScript } from 'eslint-config-typed'"},{"note":"Pre-configured Vitest setup. Use eslintConfigForJest for Jest.","symbol":"eslintConfigForVitest","correct":"import { eslintConfigForVitest } from 'eslint-config-typed'"},{"note":"Named export only. Default export is not available in v4.","wrong":"import defineKnownRules from 'eslint-config-typed'","symbol":"defineKnownRules","correct":"import { defineKnownRules } from 'eslint-config-typed'"},{"note":"Utility to apply default options to a rule configuration.","symbol":"withDefaultOption","correct":"import { withDefaultOption } from 'eslint-config-typed'"}],"quickstart":{"code":"// eslint.config.js\nimport {\n  defineConfig,\n  eslintConfigForTypeScript,\n  eslintConfigForVitest,\n} from 'eslint-config-typed';\n\nexport default defineConfig([\n  // TypeScript config for source files\n  ...eslintConfigForTypeScript({\n    tsconfigRootDir: import.meta.dirname,\n    tsconfig: 'tsconfig.json',\n    files: ['src/**/*.ts', 'src/**/*.tsx'],\n  }),\n  // Vitest config for test files\n  ...eslintConfigForVitest({\n    files: ['src/**/*.test.ts', 'src/**/*.spec.ts'],\n  }),\n  // Custom overrides\n  {\n    rules: {\n      'no-console': 'warn',\n    },\n  },\n]);","lang":"typescript","description":"Sets up a TypeScript project with Vitest using eslint-config-typed flat config."},"warnings":[{"fix":"Switch to ESM (type: \"module\" in package.json) and use import statements.","message":"Package is ESM-only since v4. CommonJS require() will throw an error.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Migrate to eslint.config.js with flat config. See ESLint migration guide.","message":"Requires ESLint 9+ flat config. Legacy .eslintrc format is not supported.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade TypeScript to version 5 or later.","message":"Requires TypeScript >=5.0.0. Older TypeScript versions are not compatible.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Check the API reference and replace old function names.","message":"Some configuration functions from v3 are replaced by new functions in v4. Old imports may break.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Use tsx (npm i -D tsx) and run eslint with node --loader tsx/esm.","message":"TypeScript config files (eslint.config.ts) require tsx or ts-node to execute. Ensure your Node version and loader support TypeScript.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Set compilerOptions.unusedLocals to false or configure import-x/no-unused-modules correctly.","message":"If using import-x/no-unused-modules, you must enable the 'unusedImports' option in tsconfig.json or provide a separate config.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Add ignorePatterns: ['node_modules'] and use ESLint cache (--cache).","message":"Performance can degrade on large monorepos. Consider caching and ignoring node_modules.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install eslint-config-typed with its peer dependencies: npm add -D eslint eslint-config-typed typescript","cause":"Missing peer dependencies or incorrect module resolution.","error":"Cannot find module 'eslint-config-typed' or its corresponding type declarations."},{"fix":"Create an eslint.config.js file and use flat config. Remove .eslintrc files.","cause":"Using legacy eslintrc format instead of flat config.","error":"Error: Failed to load config \"eslint-config-typed\" to extend from."},{"fix":"Use import { defineConfig } from 'eslint-config-typed' instead of import defineConfig from '...'","cause":"Using default import incorrectly; defineConfig is a named export.","error":"TypeError: defineConfig is not a function"},{"fix":"Switch to ESM by adding \"type\": \"module\" to package.json and use import declarations.","cause":"Package is ESM-only, but you are using require().","error":"ERR_REQUIRE_ESM: require() of ES Module not supported."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}