Skip to content

Improve error message when tslint is not recognized #738

Closed
@marcusjwhelan

Description

@marcusjwhelan

🐛 Bug Report

  • tslint-to-eslint-config version: 1.5.0
  • ESLint version: 7.10.0
  • Node version: 12.18.2

Actual Behavior

I run the command

tslint-to-eslint-config --comments tsconfig.json

Just like in my other project and get this output instead of conversion. All the same versions in my other project except it works

❌ Could not start tslint-to-eslint: ❌
  Command failed: tslint --print-config "./tslint.json"
'tslint' is not recognized as an internal or external command,
operable program or batch file.

Expected Behavior

Converts just like my other project using all the same versions

Reproduction

base.json - is the base for the tsconfig

{
    "compileOnSave": false,
    "compilerOptions": {
        "allowSyntheticDefaultImports": true,
        "target": "esnext",
        "module": "commonjs",
        "moduleResolution": "node",
        "strict": true,
        "pretty": true,
        "sourceMap": true,
        "declaration": true,
        "importHelpers": true,
        "removeComments": true,
        "noImplicitAny": true,
        "noEmitOnError": true,
        "strictNullChecks": true
    }
}

tsconfig

{
  "extends": "./configs/base.json",
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./",
    "lib": [
        "es6",
        "es2015",
        "es2017",
        "es2016.array.include",
        "es2017.object"
    ]
  },
  "include": [
    "src/**/*.ts",
    "node_modules/**/*.d.ts"
  ],
  "exclude": [
    "dist",
    "node_modules",
    "spec",
    "webpack"
  ]
}

tslint

{
  "extends": [
    "tslint:recommended"
  ],
  "rules": {
    "variable-name": [true, "ban-keywords"],
    "ordered-imports": false,
    "object-literal-sort-keys": false,
    "max-line-length": [false],
    "no-bitwise": false,
    "no-var-requires": false,
    "no-console": false,
    "typedef-whitespace": false,
    "quotemark": [ true, "single", "jsx-double", "avoid-escape"]
  }
}

Or check out the package npm clone tedb-utils https://github.com/tedb-org/tedb-utils

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: command lineArguments parsing and/or output printing on the CLI.status: accepting prsPlease, send in a PR to resolve this! ✨type: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions