{"id":47508,"library":"eslint-plugin-strict-null-checks","title":"eslint-plugin-strict-null-checks","description":"ESLint plugin that reproduces TypeScript's strictNullChecks behavior as lint rules, enabling incremental migration from strictNullChecks: false to true. Version 0.1.3 (stable, low activity) depends on typescript >=3.9.4. Unlike native tsconfig strictNullChecks, allows warnings instead of errors and can be gradually applied per file via ESLint config. Requires @typescript-eslint/parser with project option pointing to a separate tsconfig with strictNullChecks: true.","status":"active","version":"0.1.3","language":"javascript","source_language":"en","source_url":"https://github.com/JaroslawPokropinski/eslint-plugin-strict-null-check","tags":["javascript"],"install":[{"cmd":"npm install eslint-plugin-strict-null-checks","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-strict-null-checks","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-strict-null-checks","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for TypeScript type checking","package":"typescript","optional":false}],"imports":[{"note":"In ESLint config, plugin names omit the eslint-plugin- prefix.","wrong":"plugins: ['eslint-plugin-strict-null-checks']","symbol":"plugin","correct":"plugins: ['strict-null-checks']"},{"note":"The rule is namespaced with 'all' as the rule name.","wrong":"rules: { 'strict-null-checks': 'warn' }","symbol":"rule","correct":"rules: { 'strict-null-checks/all': 'warn' }"},{"note":"Requires a separate tsconfig with strictNullChecks: true to avoid affecting the rest of the project.","wrong":"parserOptions: { project: './tsconfig.json' }","symbol":"parserOptions","correct":"parserOptions: { project: './tsconfig.strictNullChecks.json' }"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    project: './tsconfig.strictNullChecks.json',\n  },\n  plugins: ['strict-null-checks'],\n  rules: {\n    'strict-null-checks/all': 'warn',\n  },\n  ignorePatterns: ['.eslintrc.js'],\n};\n\n// tsconfig.strictNullChecks.json\n{\n  \"compilerOptions\": {\n    \"strictNullChecks\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\"]\n}\n\n// Then run: npx eslint src/","lang":"javascript","description":"Configure ESLint to gradually enforce strict null checks using a separate tsconfig."},"warnings":[{"fix":"Create tsconfig.strictNullChecks.json and set parserOptions.project to that file.","message":"Requires a separate tsconfig file with strictNullChecks: true, which may conflict with existing project configuration.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Add ignorePatterns: ['.eslintrc.js'] to your ESLint config, or include .eslintrc.js in tsconfig.strictNullChecks.json with allowJs: true.","message":"Parsing error: \"parserOptions.project\" has been set for @typescript-eslint/parser. The file does not match your project config: .eslintrc.js. The file must be included in at least one of the projects provided.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Install @typescript-eslint/parser and set parser in ESLint config.","message":"The plugin only works with @typescript-eslint/parser, not the default Espree parser.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use warning level and manually review each violation before committing to fix.","message":"The 'all' rule may produce false positives for code that intentionally uses null/undefined in ways TypeScript allows when strictNullChecks is off.","severity":"breaking","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'/parser':58 '0.1.3':27 '3.9.4':34 'activ':30 'allow':39 'appli':48 'behavior':14 'check':6 'config':53 'depend':31 'enabl':18 'error':43 'eslint':2,7,52,57 'eslint-plugin-strict-null-check':1 'fals':23 'file':50 'gradual':47 'increment':19 'instead':41 'javascript':70 'lint':16 'low':29 'migrat':20 'nativ':36 'null':5 'option':61 'per':49 'plugin':3,8 'point':62 'project':60 'reproduc':10 'requir':54 'rule':17 'separ':65 'stabl':28 'strict':4 'strictnullcheck':13,22,38,68 'true':25,69 'tsconfig':37,66 'typescript':11,33,56 'typescript-eslint':55 'unlik':35 'version':26 'via':51 'warn':40","created_at":"2026-06-07T16:51:52.115547+00:00","updated_at":"2026-06-07T16:51:52.115547+00:00","problems":[{"fix":"Add ignorePatterns: ['.eslintrc.js'] to ESLint config, or include the file in tsconfig.","cause":"ESLint config file is not covered by tsconfig.strictNullChecks.json.","error":"Parsing error: \"parserOptions.project\" has been set for @typescript-eslint/parser. The file does not match your project config: .eslintrc.js."},{"fix":"Run npm install eslint-plugin-strict-null-checks --save-dev","cause":"Plugin not installed.","error":"Cannot find module 'eslint-plugin-strict-null-checks'"},{"fix":"Add 'strict-null-checks' to plugins array in ESLint config.","cause":"The plugin is not loaded in plugins section.","error":"Configuration for rule 'strict-null-checks/all' is invalid: Unknown rule strict-null-checks/all"},{"fix":"Ensure @typescript-eslint/parser is installed and parserOptions.project points to valid tsconfig.","cause":"Incompatible @typescript-eslint/parser version or missing project.","error":"TypeError: Cannot read properties of undefined (reading 'getTypeArguments')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/JaroslawPokropinski/eslint-plugin-strict-null-check#readme","github":"https://github.com/JaroslawPokropinski/eslint-plugin-strict-null-check","docs":null,"changelog":null,"pypi":null,"npm":"eslint-plugin-strict-null-checks","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}