-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(eslint-plugin): [keyword-spacing] unexpected space before/after in import type
#6095
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
Merged
bradzacher
merged 7 commits into
typescript-eslint:main
from
omril1:fix/issue6063-keyword-spacing-unexpected-space-before
Dec 2, 2022
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
78f3749
fix/issue6063-keyword-spacing-unexpected-space-before
91c18ff
remove some redundancy
4d58a46
Merge remote-tracking branch 'upstream/main' into fix/issue6063-keywo…
ac5f9bd
Add overrides for type token
78a634c
Merge remote-tracking branch 'upstream/main' into fix/issue6063-keywo…
e70260a
Merge remote-tracking branch 'upstream/main' into fix/issue6063-keywo…
e8d5efc
test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm confused. The preview deploy's playground still shows an unexpected space for one of the three issue's sample cases: https://deploy-preview-6095--typescript-eslint.netlify.app/play/#ts=4.9.3&sourceType=module&code=FASwtgDg9gTgLgAjgTwgUwQbwQZQIYBuaAJgIoCuaMIaAzggL4IBmMUYCARAHQD0+RMpWp1uAK1qcA3KEixEKdAgAWcOBABMLNh04A7KMTQAuVeo3TZ0eElQYzEbey4GjptREtA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Aa0UIHcB7aACa1kxAIZlmAc3RgA2uGw5uo6E0gAaBYqyLskAEaIAZv0Qz8cRJt17RR-Imgyjo+MitbdkXgDdHVARQZHRscRDczDBDQnDsHJwwLWERPGwBfaxioaER8WFVg1NDIOMdzSyLFDMq9C0JCrNt7MsSKxurGyDJRfDIACwbGqFKEsBcImogOrK7Rd0HOkfLkybBpmK7eJmR8BZml1pX2zI38Puhebj2Ng7AklOPVyCRdqNXY5tH71fXigV5rsVbt9Hp1eEZATYSp9lg8sr8oXNIV5gW14SdikZmK54PU3kNhjDDnCYgivEYLgBbZGKaHxWE-DFQyiU4j8V6Yd6E+nExlPRAADzZ0A50RuRLuaNJTK8gRcCFFXLpLUlR3hNTSRU1igAugpNWkgA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA. Am I missing something?
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.
I thought draft means you won't review it (Sorry, I guess it meant something else to me).
I opened it for review because I can't think of a way to solve it without adding an override option for the
type
keyword or should it use the existing option for theimport
keyword.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.
Oh I just didn't realize there was a question associated with this! Sorry, i misinterpreted the discussion. Will think on it 🙂
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.
Or, actually, definitely yes. Since the
type
option doesn't exist in ESLint core and is TypeScript-specific, we should add in a feature for it. Yes please 😄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.
Any example I can look at how to do that? The types seem looser than the schema validation (typed asoverrides?: Record<string, { before?: boolean; after?: boolean;}>
but addingtype: { after: true }
to object breaks the schema validationOK, I found something similar to the no-magic-numbers rule