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