-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
tslint to eslint migration #87644
tslint to eslint migration #87644
Conversation
Just curious, what's the reason behind the move? |
@Stanzilla The TSLint project is winding down and will no longer be maintained in the future. See palantir/tslint#4534. |
Pushed 7909462 to move the globals rules (node.js, DOM) into a custom solution that uses the TS API directly. I could not get that to work with a pure Btw there is a eslint rule for "new Buffer": https://github.com/eslint/eslint/blob/master/lib/rules/no-buffer-constructor.js |
@bpasero Won't this rule help you? https://eslint.org/docs/rules/no-restricted-globals. |
current rule mapping/migration state (tslint <=> eslint) 👌
|
@@ -173,7 +173,7 @@ export class FileLoggerService extends Disposable implements ILoggerService { | |||
getLogger(resource: URI): ILogger { | |||
let logger = this.loggers.get(resource.toString()); | |||
if (!logger) { | |||
logger = new BufferLogService, this.logService.getLevel(); | |||
logger = new BufferLogService(this.logService.getLevel()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi @sandy081
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch by the linter
@@ -180,7 +180,7 @@ export class TextFileSaveErrorHandler extends Disposable implements ISaveErrorHa | |||
// Show message and keep function to hide in case the file gets saved/reverted | |||
const actions: INotificationActions = { primary: primaryActions, secondary: secondaryActions }; | |||
const handle = this.notificationService.notify({ severity: Severity.Error, message, actions }); | |||
Event.once(handle.onDidClose)(() => { dispose(primaryActions), dispose(secondaryActions); }); | |||
Event.once(handle.onDidClose)(() => { dispose(primaryActions); dispose(secondaryActions); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi @mjbvz
I think |
This PR explores to migrate our custom tslint rules to eslint rules and adopts eslint in general.
Rules that we have today and that need migration
noDomGlobalsRule.ts(moved to custom solution)noNodejsGlobalsRule.ts(moved to custom solution)Other work packages that are required to migrate away from eslint
investigate using https://eslint.org/docs/rules/no-restricted-imports(our needs are too special)import foo = require('...')