eslint-config-tc

raw JSON →
28.0.3 verified Sat Apr 25 auth: no javascript

An ESLint shareable flat config for JavaScript projects, providing a comprehensive set of linting rules including style, import, Jest, and unicorn plugins. Current stable version is 28.0.3, requiring Node >=22, ESLint 10, and flat config. Key differentiators: integrates Prettier formatting, updates peer deps frequently, and drops legacy eslintrc support. Released irregularly with breaking changes on major bumps; v28 drops Node 20 and switches to flat config only.

error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/eslint-config-tc/index.mjs not supported.
cause Using CommonJS require() to load an ESM-only package.
fix
Use import syntax in an ESM context: import tcConfig from 'eslint-config-tc';
error ESLint couldn't find the config "eslint-config-tc".
cause Missing or incorrectly installed package; or using outdated eslintrc format.
fix
Install peer dependencies via npx install-peerdeps --dev eslint-config-tc, and use eslint.config.mjs flat config.
error Cannot find module '@eslint/js'
cause Missing peer dependency @eslint/js.
fix
npm install --save-dev @eslint/js
error Configuration for rule "jest/no-if" is invalid: Value 'error' is not accepted.
cause v26.0.0 removed jest/no-if rule; referencing it in overrides causes error.
fix
Remove jest/no-if from your overrides.
breaking v28.0.0 drops support for Node 20 and ESLint 10 flat config only, removing .eslintrc compatibility.
fix Upgrade to Node >=22 and use eslint.config.mjs flat config.
breaking v27.0.0 drops Node 18.
fix Use Node >=20.
breaking v26.0.0 requires eslint-plugin-jest >=28.0.0 and removes jest/no-if rule.
fix Update eslint-plugin-jest to ^28.0.0; remove jest/no-if from overrides.
deprecated v24.0.0 requires eslint-plugin-prettier ^5.0.0 and prettier ^3.0.0; older versions are deprecated.
fix Update compatibility: eslint-plugin-prettier >=5, prettier >=3.
gotcha Peer dependencies must be installed manually; using npx install-peerdeps --dev eslint-config-tc is recommended.
fix Run npx install-peerdeps --dev eslint-config-tc to install all peers.
gotcha Package is ESM-only since v28; require() throws ERR_REQUIRE_ESM.
fix Use import syntax or dynamic import().
npm install eslint-config-tc
yarn add eslint-config-tc
pnpm add eslint-config-tc

Basic setup for ESLint flat config using eslint-config-tc with a rule override.

// eslint.config.mjs
import tcConfig from 'eslint-config-tc';

export default [
  ...tcConfig,
  {
    rules: {
      'no-console': 'warn',
    },
  },
];