-
Notifications
You must be signed in to change notification settings - Fork 321
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
chore: extract eslint get souce code to util #772
Conversation
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
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.
LGTM! fingers crossed for the day we have ESLint parity between StyleX and WWW
@@ -9,6 +9,7 @@ | |||
|
|||
'use strict'; | |||
|
|||
import getSourceCode from './utils/getSourceCode'; |
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.
nit: we typically import modules after importing types. see the other util imports below
* chore: extract eslint get souce code to util * extract null checks * change import order for better style
* chore: extract eslint get souce code to util * extract null checks * change import order for better style
What changed / motivation ?
As per reviewer comment left by @mellyeliu on PR
feat: add no-unused eslint rule to find unused styles
, multiple eslint rule definition files are using identical conditional logic to get source code from Rule context such that we are backwards comparable with older eslint versions. This PR extract this logic into a separate util function so that it can be reused.Linked PR/Issues
Fixes #767
Additional Context
npx jest *
running all test files insideestlint-plugin
folder, all tests still passingPre-flight checklist
Contribution Guidelines