Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yoieh opened this issue Nov 22, 2021 · 1 comment
Closed

Comments

@yoieh
Copy link

yoieh commented Nov 22, 2021

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

yoieh commented Nov 22, 2021

duplicate of #1243

@yoieh yoieh closed this as completed Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant