Skip to content
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

Improve ESLint configuration #683

Merged
merged 5 commits into from
Jan 23, 2025
Merged

Improve ESLint configuration #683

merged 5 commits into from
Jan 23, 2025

Conversation

gbirke
Copy link
Member

@gbirke gbirke commented Jan 15, 2025

Use the new "flat" configuration style, copied over from the fundraising application.

Use the newly-converted "wikimedia" rules for formatting and typescript.

Apply fixes

  • Style code
  • Add Vue rules from wikimedia config
  • Update to ESLint 9 and clean up ESLint dependencies

Use the new "flat" configuration style, copied over from the fundraising
application.

Use the newly-converted "wikimedia" rules for formatting and typescript.

Fix all files where ESLint had a legitimate complaint, applying rules
that were not there before and that are not auto-fixable or just
formatting issues.
@gbirke gbirke mentioned this pull request Jan 15, 2025
Copied the rules from the [mediawiki coding style](https://github.com/wikimedia/eslint-config-wikimedia)

Marked & commented out rules that will change the code significantly,
those will need a discussion & decision with the whole team.

Commented out some rules that'll be part of the commit that
automatically fixes violations.

Fixed/changed some components that had violations. The components in
DonationForm/Forms all have an `isCurrent` property that's no longer
used in the markup. I decided to ignore the notification for now,
because the banners component still pass `is-current` to the forms and
the property could be useful in the future.
The formatting rules are purely stylistic and add more spaces in Vue components.

Auto-Fix components
Activate auto-fixable ESLint rules and fix code style
@gbirke gbirke marked this pull request as ready for review January 21, 2025 09:11
@moiikana moiikana self-requested a review January 21, 2025 09:12
Remove eslint-config-wikimedia - we have implemented its rules in the
ESLint 9 "flat" configuration ourselves

Remove eslint-plugin-jsdoc and eslint-plugin-yml - we're not using them
and they were probably an attempt to fix a eslint-config-wikimedia
dependency

Add types to MultiStepDonation form component to make the update
TypeScript compiler happy
@moiikana moiikana merged commit 67b5b34 into main Jan 23, 2025
1 check passed
@moiikana moiikana deleted the eslint-config branch January 23, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants