{"id":19607,"library":"eslint-config-typestrict","title":"TypeStrict ESLint Config","description":"An ESLint shareable configuration focused on maximizing TypeScript type safety by enabling strict rules that catch bugs. Version 1.0.5 is the latest stable, with low release cadence. Combines rules from @typescript-eslint/eslint-plugin and eslint-plugin-sonarjs, emphasizing type-correctness and runtime error prevention over code style. Unlike other configs (e.g., eslint-config-airbnb-typescript), TypeStrict is minimalist and bug-focused, requiring manual peer dependency installation and strict tsconfig setting.","status":"active","version":"1.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/krzkaczor/TypeStrict","tags":["javascript","typescript","eslint","type","safety","ruleset","types","bugs"],"install":[{"cmd":"npm install eslint-config-typestrict","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-typestrict","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-typestrict","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides TypeScript-specific ESLint rules used by the config","package":"@typescript-eslint/eslint-plugin","optional":false},{"reason":"Provides SonarJS bug-detection rules used by the config","package":"eslint-plugin-sonarjs","optional":false}],"imports":[{"note":"Extend via ESLint config, not import statement.","wrong":"import typestrict from 'eslint-config-typestrict'","symbol":"typestrict","correct":"extends: 'typestrict' in .eslintrc.json"},{"note":"The package is an ESLint config, not a module with exported rules. Use 'extends' in ESLint configuration.","wrong":"module.exports = require('eslint-config-typestrict')","symbol":"default config","correct":"module.exports = { extends: 'typestrict' }"},{"note":"Peer dependencies must be installed manually.","wrong":"npm install --save-dev eslint-config-typestrict","symbol":"peer dependencies","correct":"npm install --save-dev @typescript-eslint/eslint-plugin eslint-plugin-sonarjs"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"extends\": \"typestrict\",\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"project\": \"./tsconfig.json\",\n    \"ecmaVersion\": 2020\n  },\n  \"rules\": {\n    // optional: override rules\n  }\n}\n\n// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noUnusedLocals\": true\n    // ...\n  }\n}","lang":"typescript","description":"Shows how to configure ESLint with typestrict config, requiring manual installation of peer plugins and strict tsconfig."},"warnings":[{"fix":"Run `npm install --save-dev @typescript-eslint/eslint-plugin eslint-plugin-sonarjs`","message":"Peer dependencies must be installed manually; missing them will cause ESLint errors.","severity":"breaking","affected_versions":">=1.0"},{"fix":"Set `\"strict\": true` in compilerOptions","message":"Requires TypeScript strict mode in tsconfig.json; will produce false positives otherwise.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use typestrict@latest with ESLint, or use typestrict@1 for TSLint.","message":"Legacy typestrict@1 for TSLint users; modern versions are ESLint-only.","severity":"deprecated","affected_versions":"=1.0"},{"fix":"Override rule: `'no-invalid-this': 'off'` if needed.","message":"Config enforces `no-invalid-this` which can conflict with class property initializers in TypeScript.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Ensure `parserOptions.project` points to your tsconfig.json.","message":"Config uses `@typescript-eslint/no-floating-promises` which requires parserOptions.project to be set correctly.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add `\"parserOptions\": { \"project\": \"./tsconfig.json\" }` to ESLint config.","cause":"Missing parserOptions.project in ESLint config.","error":"ESLint: Error while loading rule '@typescript-eslint/await-thenable': You have used a rule which requires parserServices to be generated. You must provide the `parserOptions.project` property for @typescript-eslint/parser."},{"fix":"Run `npm install --save-dev eslint-plugin-sonarjs`.","cause":"Peer dependency not installed.","error":"ESLint: Cannot find module 'eslint-plugin-sonarjs'"},{"fix":"Use `\"warn\"` or `\"error\"` instead of `true`.","cause":"Incorrect rule severity format.","error":"ESLint: Configuration for rule '@typescript-eslint/no-unnecessary-condition' is invalid: Value \"true\" is not a valid severity."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}