{"id":26531,"library":"tsconfig-lint","title":"tsconfig-lint","description":"A CLI and Node API to run TSLint on files listed in a tsconfig.json. Integrates with tsconfig-glob for filesGlob support. Active development up to v0.12.0, with a deprecation notice recommending migration to TypeScript 2.0's built-in 'include' glob support. Differentiator: automates linting of tsconfig-defined files, reducing manual file list maintenance. Uses a callback-based async API. Last release v0.12.0; no recent updates.","status":"deprecated","version":"0.12.0","language":"javascript","source_language":"en","source_url":"https://github.com/wjohnsto/tsconfig-lint","tags":["javascript","tsconfig","glob","filesGlob"],"install":[{"cmd":"npm install tsconfig-lint","lang":"bash","label":"npm"},{"cmd":"yarn add tsconfig-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add tsconfig-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"tsconfig-lint runs TSLint; must be installed separately","package":"tslint","optional":false}],"imports":[{"note":"tsconfig-lint exports a single function as a module, not a default export. Use namespace import.","wrong":"import lint from 'tsconfig-lint'","symbol":"default","correct":"import * as lint from 'tsconfig-lint'"},{"note":"In CJS, require returns the function directly; destructuring gives undefined.","wrong":"const { lint } = require('tsconfig-lint')","symbol":"lint function","correct":"const lint = require('tsconfig-lint')"},{"note":"TypeScript users can import the Options interface for typing the config object.","wrong":"","symbol":"type Options","correct":"import type { Options } from 'tsconfig-lint'"}],"quickstart":{"code":"import * as lint from 'tsconfig-lint';\nimport * as path from 'path';\n\nconst options = {\n  configPath: '.',\n  cwd: process.cwd(),\n  useGlob: true,\n  tsconfigOptions: { indent: 2 },\n  tsLintConfigFilePath: 'tslint.json'\n};\n\nlint(options, (err: Error | null) => {\n  if (err) {\n    console.error('Linting failed:', err);\n    process.exit(1);\n  }\n  console.log('Linting complete');\n});","lang":"typescript","description":"Run tslint using tsconfig-lint with custom options including filesGlob."},"warnings":[{"fix":"Update scripts using --use-glob to rely solely on filesGlob; no longer need tsconfig-glob installed.","message":"In v0.9.0, the --use-glob option now only uses filesGlob instead of files, and tsconfig-glob has been removed as a dependency.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Migrate to TypeScript 2.0+ and use the 'include' and 'exclude' properties in tsconfig.json; stop using tsconfig-lint.","message":"This package is deprecated in favor of TypeScript 2.0's 'include' property for glob support in tsconfig.json.","severity":"deprecated","affected_versions":">=0.12.0"},{"fix":"Use `const lint = require('tsconfig-lint')` instead of destructured import.","message":"The CJS require returns the function directly, not an object with a 'lint' property.","severity":"gotcha","affected_versions":"all"},{"fix":"Install tsconfig-glob separately if you need filesGlob support, or use TypeScript's built-in glob patterns.","message":"In v0.9.0, tsconfig-glob was removed as a dependency, so filesGlob expansion must be handled externally if needed.","severity":"breaking","affected_versions":">=0.9.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `import * as lint from 'tsconfig-lint'` or `const lint = require('tsconfig-lint')`.","cause":"Importing the module incorrectly using named export instead of namespace import.","error":"TypeError: lint is not a function"},{"fix":"Run `npm install tsconfig-lint --save-dev`.","cause":"Package not installed in node_modules.","error":"Cannot find module 'tsconfig-lint'"},{"fix":"Ensure the configPath directory contains a tsconfig.json, or provide the full path to a .json file.","cause":"The configPath option points to a directory without a tsconfig.json file.","error":"Error: ENOENT: no such file or directory, open 'tsconfig.json'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}