Skip to content

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

@yoieh

Description

@yoieh

πŸ’₯ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions