-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(eslint): making a couple of our internal custom rules open source #871
Conversation
}, | ||
create: context => { | ||
return { | ||
Program(node) { |
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 can see if a file actually contains TS by checking if it uses import
or some sort of type but because a file could potentially have neither of those, and still be perfectly fine, I'm leaving it to just assert the filename.
Though maybe in those cases the warning could just be ignored? I'm not sure.
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.
one question below otherwise LGTM!
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.
hard to tell when skimming through this code but is this code smart enough to distinguish spread syntax?
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.
Co-authored-by: Kanad Gupta <[email protected]>
🧰 Changes
This makes a couple of our internal ESLint rules open source by pulling them into our
eslint-plugin-readme
package. The rules included in this are:readme/no-decorators-on-private-properties
: Prevents the use of decorators on private properties as they cannot be introspected.readme/prefer-unicode-ellipsis
: Prefer using a unicode ellipsis (…
) instead of three periods (...
).Those rules have been pulled over verbatim from our internal codebase.
In addition to that I'm also introducing a new (and definitely not enabled) rule,
readme/prefer-typescript
, to prefer that a codebase is written in TypeScript by asserting file extensions.