
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
eslint-config-ts-strict
Advanced tools
Very strict ESLint config for projects using TypeScript, React and Prettier. ESLint v9 flat config only. Formatting rules disabled to prevent Prettier conflicts.
Strongly opinionated ESLint config for projects using TypeScript, React and Prettier.
ESLint v9 flat config only - This package requires ESLint v9 and uses the modern flat configuration format.
Install the package with npm, yarn, or pnpm:
npm i eslint-config-ts-strict eslint typescript --save-dev
yarn add eslint-config-ts-strict eslint typescript --dev
pnpm add eslint-config-ts-strict eslint typescript --dev
That's it! All required ESLint plugins are bundled as dependencies, so you only need to install the config package, ESLint itself, and TypeScript.
Create an eslint.config.js file in your project root:
import tsStrict from "eslint-config-ts-strict";
export default [
...tsStrict,
{
// Add your custom rules here
rules: {
// Example: override specific rules
},
},
];
For scenarios where you only want to enforce whitespace and formatting rules as errors:
import tsStrictWhitespace from "eslint-config-ts-strict/whitespace";
export default [tsStrictWhitespace];
import tsStrict from "eslint-config-ts-strict";
export default [
// Apply the ts-strict configuration
...tsStrict,
// Global ignores
{
ignores: [
"dist/**",
"build/**",
"coverage/**",
"node_modules/**",
"*.min.js",
],
},
// Override specific rules
{
files: ["**/*.{ts,tsx}"],
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
},
},
// Different rules for test files
{
files: ["**/*.test.{ts,tsx,js,jsx}", "**/*.spec.{ts,tsx,js,jsx}"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
},
},
];
This configuration requires the following peer dependencies:
eslint >= 9.0.0@typescript-eslint/eslint-plugin >= 8.29.1@typescript-eslint/parser >= 8.29.1eslint-plugin-import >= 2.31.0eslint-plugin-simple-import-sort >= 12.1.1eslint-plugin-unused-imports >= 3.2.0@eslint/js >= 9.0.0This package is designed specifically for ESLint v9's flat config format and does not support legacy .eslintrc configurations.
Contributions are always welcome!
If you find a bug or have a suggestion for improvement, please open an issue or submit a pull request.
FAQs
Very strict ESLint config for projects using TypeScript, React and Prettier. ESLint v9 flat config only. Formatting rules disabled to prevent Prettier conflicts.
We found that eslint-config-ts-strict demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.