Skip to content

Commit

Permalink
eslint: Clean up deprecated rules (#40459)
Browse files Browse the repository at this point in the history
There are a lot of rules in our config that are normally disabled by
eslint-plugin-prettier/recommended, but we've been turning them back on.
Many of them are now deprecated in eslint too (in favor of
`@stylistic/eslint-plugin-js`). Let's disable them and let prettier
handle it.

- comma-spacing
- computed-property-spacing
- curly
- func-call-spacing
- jsx-quotes
- key-spacing
- keyword-spacing
- no-extra-semi
- no-multiple-empty-lines
- no-multi-spaces
- no-spaced-func
- no-trailing-spaces
- object-curly-spacing
- operator-linebreak
- padded-blocks
- react/jsx-curly-spacing
- react/jsx-tag-spacing
- semi
- semi-spacing
- space-before-blocks
- space-infix-ops
- space-in-parens
- space-unary-ops

A few more we had been disabling even though prettier already disabled
them.

- comma-dangle
- space-before-function-paren

And then there are a few deprecated in favor of `eslint-plugin-n` instead.

- no-process-exit → n/no-process-exit
- no-restricted-imports → n/no-restricted-import
- no-restricted-modules → n/no-restricted-require

And since we're now bringing in `eslint-plugin-n`, may as well enable a
few additional rules from that plugin too.

- n/no-deprecated-api
- n/no-exports-assign
- n/process-exit-as-throw

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12184535037

Upstream-Ref: Automattic/jetpack@d6d5f2b
  • Loading branch information
anomiex authored and matticbot committed Dec 5, 2024
1 parent d08b779 commit 407c4c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [3.1.14-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

## [3.1.13] - 2024-11-25
### Changed
- Update example with ids for jsx-a11y/label-has-associated-control. [#40199]
Expand Down Expand Up @@ -176,6 +180,7 @@

- Build: Refactored (aligned build system with Gridicons).

[3.1.14-alpha]: https://github.com/Automattic/social-logos/compare/v3.1.13...v3.1.14-alpha
[3.1.13]: https://github.com/Automattic/social-logos/compare/v3.1.12...v3.1.13
[3.1.12]: https://github.com/Automattic/social-logos/compare/v3.1.11...v3.1.12
[3.1.11]: https://github.com/Automattic/social-logos/compare/v3.1.10...v3.1.11
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "social-logos",
"version": "3.1.13",
"version": "3.1.14-alpha",
"description": "A repository of all the social logos used on WordPress.com.",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/social-logos/",
"bugs": {
Expand Down

0 comments on commit 407c4c8

Please sign in to comment.