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

Replacing eslint with standard cli #1796

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

etroynov
Copy link
Contributor

Hi,

While working on one of the plugins for koa which is used in our company I needed to study some points in the Koa source code, during the installation of dependencies I noticed deprecating warnings.

In the course of studying the project's dependencies I found:

  • eslint-plugin-node - the plugin has not been updated for the last 4 years and for this reason a fork of eslint-plugin-n was created which is recommended for use;
  • eslint-plugin-standard - marked as deprecated and the official standard website recommends using their cli utility;
  • .eslintrc.yml - does not have any special settings and uses only:
extends: standard

why not just update eslint?

I can see several reasons why the official utility is better than the eslint custom config ( in my opinion ofc ):

  • fewer dependencies - With eslint we have to monitor and update the list of dependencies:
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",

With standartd we have only two dependecies and one of it is optional:

"snazzy": "^9.0.0", // just for pretty output
"standard": "^17.1.0",
  • deprecated dependencies - If, for example, one of the dependencies becomes unsupported, we will need to find a replacement for it, which will also need to be monitored, so it seems to me that if we can avoid this, we should do it.
  • official way - If a tool has an official cli that is maintained and updated by their team, why not just use it?

Checklist

  • I have ensured my pull request is not behind the main or master branch of the original repository.
  • I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first.
  • I have written a commit message that passes commitlint linting.
  • I have ensured that my code changes pass linting tests.
  • I have ensured that my code changes pass unit tests.
  • I have described my pull request and the reasons for code changes along with context if necessary.

Copy link

socket-security bot commented Jan 11, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
snazzy 9.0.0 None +7 247 kB feross
standard 17.1.0 None +143 16.4 MB voxpelli

🚮 Removed packages: eslint@7.32.0, eslint-config-standard@16.0.3, eslint-plugin-import@2.26.0, eslint-plugin-node@11.1.0, eslint-plugin-promise@5.2.0, eslint-plugin-standard@5.0.0

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5ba533f) 98.66% compared to head (4db592c) 98.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1796   +/-   ##
=======================================
  Coverage   98.66%   98.66%           
=======================================
  Files           5        5           
  Lines         523      523           
  Branches      146      146           
=======================================
  Hits          516      516           
  Misses          7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@etroynov
Copy link
Contributor Author

@dead-horse, @fengmk2

Can you take a look?

Copy link
Member

@fengmk2 fengmk2 left a comment

Choose a reason for hiding this comment

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

+1

@fengmk2 fengmk2 merged commit ac61b8c into koajs:master Jan 17, 2024
10 checks passed
@etroynov
Copy link
Contributor Author

@fengmk2 thx a lot :)

etroynov added a commit to etroynov/koa that referenced this pull request Apr 1, 2024
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.

None yet

2 participants