-
Notifications
You must be signed in to change notification settings - Fork 889
Conversation
Yeah, i'm generally on board. We can stop exporting them from the root of the package and use direct imports to the utils modules wherever necessary (instead of |
@@ -107,6 +107,6 @@ export abstract class ScopeAwareRuleWalker<T> extends RuleWalker { | |||
} | |||
|
|||
protected isScopeBoundary(node: ts.Node): boolean { | |||
return isScopeBoundary(node); | |||
return isScopeBoundary(node); // tslint:disable-line:deprecation |
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.
can you switch to using the tsutils
function here?
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.
There are some differences between the two that could break some custom rules. Since this is deprecated, I don't think we need to replace all deprecated utils.
@@ -21,13 +21,15 @@ import { IOptions } from "../rule/rule"; | |||
import { isBlockScopeBoundary } from "../utils"; | |||
import { ScopeAwareRuleWalker } from "./scopeAwareRuleWalker"; | |||
|
|||
// tslint:disable:deprecation |
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.
can you comment here explaining why we're disabling the rule for the file?
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.
done
Deprecate most of the utility functions in
src/language/utils.ts
. Some of them are no longer used.The other deprecated functions can be easily replaced by functions from
tsutils
.I think we should get rid of these functions to avoid maintaining them. For example
forEachToken
(withskipTrivia
false) andforEachComment
will no longer function correctly with the newly addedJsxFragment
.[deprecation] several utility functions have been deprecated
I'm in favor of making the remaining utilities in
src/utils.ts
andsrc/language/utils.ts
internal in the next major version. Most of them are not meant to be exposed as public API. WDYT?