slackapi / node-slack-sdk

Slack Developer Kit for Node.js
https://slack.dev/node-slack-sdk
MIT License
3.26k stars 656 forks source link

chore: tweak lint config to allow for `eslint --fix` to fix import order #1827

Closed filmaj closed 2 weeks ago

filmaj commented 2 weeks ago

Small maintainer QoL fix: tweaked the eslint config to use a combination of ESLint's stock sort-imports rule and eslint-plugin-import's import/order rule to allow for eslint --fix to fix import ordering. This was driving me a bit crazy eyetwitch and I found this comment that showed off using the two rules in combo.

Also ensured all the lint npm run scripts use the --fix rule across all monorepo packages.

The only change worth reviewing is within lint-configs/ - all other file changes are simply style fixes.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.85%. Comparing base (b1dad13) to head (8ec1793).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1827 +/- ## ========================================== + Coverage 81.81% 81.85% +0.04% ========================================== Files 35 35 Lines 7763 7782 +19 Branches 317 317 ========================================== + Hits 6351 6370 +19 Misses 1400 1400 Partials 12 12 ``` | [Flag](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/1827/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | Coverage Δ | | |---|---|---| | [cli-hooks](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/1827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `95.07% <ø> (ø)` | | | [cli-test](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/1827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `54.13% <100.00%> (+0.23%)` | :arrow_up: | | [oauth](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/1827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `76.53% <100.00%> (+0.02%)` | :arrow_up: | | [socket-mode](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/1827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `59.59% <100.00%> (+0.17%)` | :arrow_up: | | [web-api](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/1827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `96.55% <100.00%> (+<0.01%)` | :arrow_up: | | [webhook](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/1827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `95.27% <100.00%> (+0.07%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi#carryforward-flags-in-the-pull-request-comment) to find out more.