-
Notifications
You must be signed in to change notification settings - Fork 46
chore: enforce order by access modifier with ESLint rule #2447
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: weboko <[email protected]>
size-limit report 📦
|
@copilot help |
What specific help do you need with the ESLint member ordering rule? I can assist with:
|
@copilot fix all of the violations as well as ensure that |
…from 188 to 183 Co-authored-by: weboko <[email protected]>
Started fixing all member ordering violations. Reduced count from 188 to 183 by fixing 3 files so far. The build environment has missing dependencies preventing full npm run check/build, but ESLint is working correctly and violations are being systematically resolved. Commit 0012e93 shows the progress. |
…ions from 183 to 176 Co-authored-by: weboko <[email protected]>
… from 176 to 174 Co-authored-by: weboko <[email protected]>
This PR introduces an ESLint rule to enforce consistent ordering of class members based on access modifiers as requested in the issue.
Changes
Added
@typescript-eslint/member-ordering
rule to.eslintrc.json
with configuration to enforce the order:Fixed existing violation in
packages/enr/src/enr.ts
where a static method was incorrectly placed after a public fieldRule Configuration
The rule enforces this specific member ordering:
Impact
Example
Before (violation):
After (correct):
Fixes #2334.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.