-
-
Notifications
You must be signed in to change notification settings - Fork 89
Stop using default exports from packages/cursorless-engine/src/processTargets. #2011
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
Conversation
I think the eslint rule we want prevent regression is
but it has to be in an .eslintrc file in packages/cursorless-engine/src/processTargets and I haven't figured out what other boilerplate it needs yet. |
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.
🙌
import { fitRangeToLineContent } from "./LineScopeHandler"; | ||
import { TargetScope } from "./scope.types"; | ||
|
||
export default class TokenScopeHandler extends BaseScopeHandler { | ||
export class ParagraphScopeHandler extends BaseScopeHandler { |
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.
Whoops nice catch 😅
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.
Well, the compiler caught it for me. :-)
Here is the quick-hack shell script I wrote to make this PR. We can probably adapt it to remove default exports from everywhere in cursorless:
|
No we want https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md |
Did you want to add rule in this PR or follow up? I don't feel strongly |
Followup since I don't know how to create the appropriate .eslintrc.json file yet. |
Head branch was pushed to by a user without write access
Added lint rule. |
Nice! Have you checked that it's actually biting? |
Yes, I confirmed that the lint rule works. |
This removes all default exports from packages/cursorless-engine/src/processTargets.
I'm not yet sure if this will actually help me achieve my larger goal but it is a small net improvement in the codebase in any case.