Skip to content

Expects includes in excludes in tsconfig.json while the property is include and exclude #1709

Closed
@wisammechano

Description

@wisammechano

🐛 Bug Report

  • tslint-to-eslint-config version: 2.14.0
  • ESLint version: 8.38.0
  • Node version: 16.18.0

Actual Behavior

Running with --comments modifier removed the tslint comments in some 100+ files (from output message) when the project doesn't have this number of files. It was traversing node_modules as well which isn't in the include config in tsconfig.json.

After some testing, I changed include to includes and now the config was respected (only 48 files were converted) which were inside ./src/**

Expected Behavior

Should respect the config as include and exclude and only traverse the included files when converting comments

Reproduction

The npx .. command was run in a directory with express and typescript source files. tsconfig.json is attached below.

The project structure is a mono repo with multiple subdirs:

  • .git
  • server
    • src
    • node_modules
    • dist
    • tsconfig.json
    • tslint.json
    • ...
  • client
  • ...

The command run and tsconfig.json are both inside ./server subdir.

tsconfig.json

{
  "compilerOptions": {
    "target": "ES2021",
    "module": "CommonJS",
    "esModuleInterop": true,
    "lib": ["ES2021", "DOM"],
    "sourceMap": true,
    "inlineSources": true,
    "outDir": "dist",
    "strict": true,
    "moduleResolution": "node",
    "allowSyntheticDefaultImports": true,
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true,
    "importHelpers": true,
    "declaration": true,
    "incremental": true,
    "removeComments": true,
    "skipLibCheck": true,
    "rootDir": "src",
    "sourceRoot": "src",
    "typeRoots": ["node_modules/@types"],
    "baseUrl": ".",
    "paths": {
      "#*": ["src/*"]
    }
  },
  "include": ["src/**/*.ts"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: accepting prsPlease, send in a PR to resolve this! ✨type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions