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

rework eslint config #11615

Merged
merged 9 commits into from
Jun 9, 2020
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented May 24, 2020

  • use new explicit config that specifies each rule
  • upgrade eslint to 7.1.0
  • add new plugins with selected rules enabled
  • fix discovered issues, remove global wipPrefixes

Rules are mostly based on my config. Two of the plugins still don't specify eslint 7 compatibilty, but I think it's no issue, they do work fine.

@silverwind silverwind force-pushed the eslint-config-update branch 2 times, most recently from b73a3a7 to 09035a3 Compare May 24, 2020 22:52
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 24, 2020
@techknowlogick techknowlogick added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label May 25, 2020
@techknowlogick techknowlogick added this to the 1.13.0 milestone May 25, 2020
templates/base/head.tmpl Outdated Show resolved Hide resolved
@silverwind
Copy link
Member Author

I can undo the config/dependency changes if requested.

There is a certain benefit of depending on a shared config because much less work is required to update the config, even thought we need to disable 20-something rules that are too opinionated in the airbnb config.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 27, 2020
Copy link
Member

@gary-kim gary-kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 9, 2020
- use explicit config that only enables rules
- upgrade eslint to 7.1.0
- add new plugins with selected rules enabled
- fix discovered issues, remove global wipPrefixes
@silverwind
Copy link
Member Author

silverwind commented Jun 9, 2020

Updated eslint and plugins again. eslint-plugin-import is now officially compatible with eslint 7 which only leaves eslint-plugin-sonarjs not officially compatible (but still works). I'm still quite fond of eslint-plugin-sonarjs because it does provide a few useful rules.

@silverwind
Copy link
Member Author

silverwind commented Jun 9, 2020

Rebased and fixed one more new violation (detected by eslint-plugin-sonarjs 😉).

@techknowlogick
Copy link
Member

ping LG-TM

@techknowlogick techknowlogick merged commit 19db3f4 into go-gitea:master Jun 9, 2020
@silverwind silverwind deleted the eslint-config-update branch June 9, 2020 21:36
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* rework eslint config

- use explicit config that only enables rules
- upgrade eslint to 7.1.0
- add new plugins with selected rules enabled
- fix discovered issues, remove global wipPrefixes

* remove if

* undo template change

* add disabled rules as well for easier config updating

* add missing disabled rule

* update eslint and plugins

* fix new violation

* remove deprecated rules

Co-authored-by: Lauris BH <lauris@nix.lv>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants