-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Description
π₯ 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
Labels
No labels