typescript-eslint / tslint-to-eslint-config

Converts your TSLint configuration to the closest possible ESLint equivalent. πŸš€
MIT License
849 stars 100 forks source link

Missing Merger #375

Closed pavsaund closed 4 years ago

pavsaund commented 4 years ago

πŸ’₯ Missing Merger

I'm following https://code.visualstudio.com/api/advanced-topics/tslint-eslint-migration and encountered the missing merger issue. I'm unclear on what the next steps are regarding this specific issue is, but reporting the issue as requested in the log output.

CLI Output

✨ 92 rules replaced with their ESLint equivalents. ✨

❗ 7 ESLint rules behave differently from their TSLint counterparts ❗
  * camelcase:
    - Leading undescores in variable names will now be ignored.
  * no-underscore-dangle:
    - Leading and trailing underscores (_) on identifiers will now be ignored.
  * no-invalid-this:
    - Functions in methods will no longer be ignored.
  * no-unused-expressions:
    - The TSLint optional config "allow-new" is the default ESLint behavior and will no longer be ignored.
  * prefer-arrow/prefer-arrow-functions:
    - ESLint does not support allowing standalone function declarations.
    - ESLint does not support allowing named functions defined with the function keyword.
  * eqeqeq:
    - Option "smart" allows for comparing two literal values, evaluating the value of typeof and null comparisons.
  * no-redeclare:
    - ESLint does not support check-parameters.

❌ 1 error thrown. ❌
  Check ./tslint-to-eslint-config.log for details.

❓ 5 rules do not yet have ESLint equivalents ❓
  See generated log file; defaulting to eslint-plugin-tslint for these rules.

⚑ 3 packages are required for new ESLint rules. ⚑
  prefer-arrow
  import
  eslint-plugin-import

βœ… All is well! βœ…

File Output

tslint-to-eslint-config.log
Error: multiple output @typescript-eslint/consistent-type-assertions ESLint rule options were generated, but tslint-to-eslint-config doesn't have "merger" logic to deal with this.
Please file an issue at https://github.com/typescript-eslint/tslint-to-eslint-config/issues/new?template=missing_merger.md πŸ™

tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "jsdoc-format"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "no-reference-import"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "object-literal-sort-keys"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "prefer-conditional-expression"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "prettier"


Reproduction

tsconfig.json
{
    "extends": "./node_modules/@dolittle/typescript.build/TSConfig/tsconfig.base.json",
    "compilerOptions": {
        "baseUrl": "./Features",
        "sourceMap": true,
        "inlineSourceMap": false,
        "inlineSources": false,
        "noImplicitAny": false,
        "target": "es5",
        "module": "esnext",
        "moduleResolution": "node",
        "allowJs": true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "declaration": false,
        "strict": false,
        "lib": ["es2019", "dom"],
    },
    "include": [
        "./custom_typings/**/*.d.ts",
        "./**/*.ts"
    ],
    "exclude": [
        "node_modules",
        "aurelia_project"
    ]
}
tsconfig.base.json
{
  "compilerOptions": {
    "lib": ["es2017", "dom"],
    "module": "commonjs",
    "target": "es2015",
    "esModuleInterop": true,
    "stripInternal": true,

    "declaration": true,

    "strict": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,

    "moduleResolution": "node",
    "inlineSourceMap": true,
    "inlineSources": true,

    "downlevelIteration": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}
.prettierrc
{
    "tabWidth": 4,
    "singleQuote": true,
    "printWidth": 120,
    "trailingComma": "none"
}
JoshuaKGoldberg commented 4 years ago

Thanks so much for filing @pavsaund! I believe this is a duplicate of #321 actually. Will work on a fix soon!