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 4b97cff commit 98b6464
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 56 deletions.
56 changes: 28 additions & 28 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "9e4efce2d5cf3c48d7d3cc0cae7daceb6e9d1c2c"
"reference": "f8fd0ad07e37fe977e9bdb920755b544e1e15e69"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -63,7 +63,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "e99ae24586f9167da5da30023f0fd484f044bc30"
"reference": "3a15cd88ad5ab9a07b4095b1da6d21da3f057384"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -131,7 +131,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "621032958b3ddc7f9243462dde1cc7f6d4b2b46d"
"reference": "2b99f35b849c6038c939f3a6e957b89b8dfd770a"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -203,7 +203,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "79d890e3c9f87551a51aca3565a60882f6c891c6"
"reference": "71a5404990f8572f8fab4528b0b91e014c9e9461"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -274,7 +274,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "6fc34c9061d515ced0debe7882177b60c1fe55bf"
"reference": "94a0df8838264ba492c5b7f01bf87de5b9514d92"
},
"require": {
"automattic/jetpack-connection": "^6.1.1",
Expand Down Expand Up @@ -345,7 +345,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "e4e25e3b7b1dd64e2452acbcfdb9b0359ebff01a"
"reference": "62b5a6abc81c81d7d5dba336582f6293dfe5d038"
},
"require": {
"automattic/jetpack-boost-core": "^0.3.2",
Expand Down Expand Up @@ -424,7 +424,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "7078f305e8fe866e1b41fa3fc53745c095c6193e"
"reference": "085f2f023eb7ca73d0ec82c136cbdeb19578cf41"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -487,7 +487,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "cc394263c3030aa1645a6a0f237049d76f765d23"
"reference": "09f02bc11ea4fb18c0a77a71cb15c271ad9bb5ef"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -562,7 +562,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "78773d88699121ff60569636ae065b164aa9ffdc"
"reference": "b6c353f62249d6998bfc650a536e4b09da6390e4"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -655,7 +655,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "5cb20642fdae7d4c767f732225dbd8242bfd4b12"
"reference": "b94791bb8d03cafc480ff1ad68785dd876e33982"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -712,7 +712,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "e36c6f48a1768a2e1dd3759a66b2cff197e2814d"
"reference": "83fa60ad7a2905505f35cbeeee1d45d6844b6af1"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -768,7 +768,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "c37dad5694b93fe30cacb3e614d9db0be42b6d79"
"reference": "29e9956beadfa5268cdf7fb75564accfd099c73e"
},
"require": {
"automattic/jetpack-connection": "^6.1.1",
Expand Down Expand Up @@ -846,7 +846,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "35742cc17ce8b9933928996822fcb185acd175c6"
"reference": "41687450c0ff6c91c9e33b9fd8617dc072969b47"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -907,7 +907,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "b5494e5eefaba5a3e3b82c64d3fa64ca9464a345"
"reference": "8a079a0f1a24ce6253cfd1c5e42262425341c700"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -985,7 +985,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "c716ec7a1f4713971189f623473b67e4d053326f"
"reference": "01172ee7e452800d10a00041239ccb873cc79ea7"
},
"require": {
"automattic/jetpack-connection": "^6.1.1",
Expand Down Expand Up @@ -1050,7 +1050,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "a18f80ccfc515bebdcfce529c110c62af8ce9151"
"reference": "1955b577f5d40d385c40ffef6b0dc2d971a4392a"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1106,7 +1106,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "57bd6f0087d75564760b19a940ef69094d32deed"
"reference": "6672dcc8f25aee0b070af152e7edd116971e960f"
},
"require": {
"automattic/jetpack-admin-ui": "^0.5.1",
Expand Down Expand Up @@ -1211,7 +1211,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "d8d8aa48b9558523c43873680e69beb89928226f"
"reference": "b382e4357cf37a4e9c13765b1a95d84ec5e0972b"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1275,7 +1275,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "ecd91981aeff045a0c59e50f4a57a10a5a9e2960"
"reference": "c69600b1b1ef3272204b6e9bd5595d3b63419189"
},
"require": {
"automattic/jetpack-connection": "^6.1.1",
Expand Down Expand Up @@ -1346,7 +1346,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "4990b52333233d6ce4bfe5d8d43095ab0d46ed91"
"reference": "4511b1b64c66c9cbaf4929d826e819b850547474"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1405,7 +1405,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "1c0c03e2d8a50b93e925d2686cbc72cae9be546d"
"reference": "c1f4f7675aec0a2ac2edf6494c50382d4e341438"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1478,7 +1478,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "919a163355af4d0c2a271989af1a09bba4f42f46"
"reference": "4b2dd8246fd51f039302a47bbd735f9ae7ae28ce"
},
"require": {
"automattic/jetpack-connection": "^6.1.1",
Expand Down Expand Up @@ -1556,7 +1556,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "39c40bf5fdc21b9b59b359e653c6aea8eb4d1239"
"reference": "18355935a17e2b8edc6bfb95713b6c970f541a49"
},
"require": {
"automattic/jetpack-status": "^5.0.1",
Expand Down Expand Up @@ -1614,7 +1614,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "8af23095a12a0ad271e57668e5afcf4b4fab377f"
"reference": "d3c1b98e9ab7e3bc170291edc887b3172fad8728"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1671,7 +1671,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-search",
"reference": "fe5852b84a45efd90f773819519bd3e09a343b6e"
"reference": "dc7acf3cc3ea002dd15dfca2e5f4190d537f9983"
},
"require": {
"automattic/jetpack-assets": "^4.0.1",
Expand Down Expand Up @@ -1762,7 +1762,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
"reference": "590cb0c4d55a0898ef57c42a2996989131fc1ecf"
"reference": "b8c943877f8039c5f889775ecb9a2e59b4f0402a"
},
"require": {
"automattic/jetpack-connection": "^6.1.1",
Expand Down Expand Up @@ -1832,7 +1832,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "611e2583c3f3901e248da5e0ecb871f160b52184"
"reference": "2af937b8acd0f59dade2d452fbb06a7b27189e50"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -1899,7 +1899,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "8afea0a6919d5f3da923488b0386b396012d1bc8"
"reference": "853beb2298c4d57bb50f0b06446cc95aee014104"
},
"require": {
"automattic/jetpack-connection": "^6.1.1",
Expand Down
Loading

0 comments on commit 98b6464

Please sign in to comment.