typescript-eslint/tslint-to-eslint-config

multiple output react/jsx-curly-spacing ESLint rule options were generated

yoieh opened this issue ยท 1 comments

yoieh commented

๐Ÿ’ฅ Missing Merger

  • tslint-to-eslint-config version: X.X.X
  • ESLint version: X.X.X

CLI Output

โœจ 88 rules replaced with their ESLint equivalents. โœจ

โ— 6 ESLint rules behave differently from their TSLint counterparts โ—
  Check ./tslint-to-eslint-config.log for details.

โŒ 1 error thrown. โŒ
  Check ./tslint-to-eslint-config.log for details.

๐Ÿฆ– 1 rule is obsolete and does not have an ESLint equivalent. ๐Ÿฆ–
  Check ./tslint-to-eslint-config.log for details.

โ™ป Consider using --comments to replace TSLint comment directives in your source files. โ™ป

โœ… All is well! โœ…

File Output

6 ESLint rules behave differently from their TSLint counterparts:
  * no-invalid-this:
    - Functions in methods will no longer be ignored.
  * @typescript-eslint/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-underscore-dangle:
    - Leading and trailing underscores (_) on identifiers will now be ignored.
  * padded-blocks:
    - ESLint's padded-blocks rule also bans a blank line before a closing brace.

Error: multiple output react/jsx-curly-spacing 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. Thanks!

  * import-destructuring-spacing

Reproduction

mkdir recreate-error && cd recreate-error
npm init -y
npm install --save-dev typescript
echo '
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "declaration": true,
    "outDir": "./lib",
    "strict": true
  },
  "include": ["src"],
  "exclude": ["node_modules", "**/__tests__/*"]
}
' > tsconfig.json

npm install --save-dev prettier tslint tslint-config-prettier

echo '
{
   "extends": ["tslint:recommended", "tslint-config-prettier"]
}
' > tslint.json
echo '
{
  "printWidth": 120,
  "trailingComma": "all",
  "singleQuote": true
}
' > .prettierrc
npm install --save-dev jest ts-jest @types/jest
echo '
{
  "transform": {
    "^.+\\.(t|j)sx?$": "ts-jest"
  },
  "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
  "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
}
' > jestconfig.json

https://code.visualstudio.com/api/advanced-topics/tslint-eslint-migration

npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin tslint-config-prettier eslint-config-prettier eslint-plugin-jsdoc eslint-plugin-prefer-arrow eslint-plugin-react
npx tslint-to-eslint-config
yoieh commented

duplicate of #1243