diff --git a/.eslintrc.js b/.eslintrc.js index b05cc81937bba4..d9f2b3ae8e132b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -53,6 +53,7 @@ module.exports = { allowedTextDomain: 'default', }, ], + '@wordpress/no-unsafe-wp-apis': 'off', 'no-restricted-syntax': [ 'error', // NOTE: We can't include the forward slash in our regex or diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index b7093ff1da142b..f39b5834e9e7c7 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -6,6 +6,7 @@ - Enabled `import/no-extraneous-dependencies` rule in the `recommended` ruleset. - Enabled `import/no-unresolved` rule in the `recommended` ruleset. +- Enabled `no-unsafe-wp-apis` rule in the `recommended` ruleset ([#27327](https://github.com/WordPress/gutenberg/pull/27327)). ## 7.4.0 (2020-12-17) diff --git a/packages/eslint-plugin/configs/custom.js b/packages/eslint-plugin/configs/custom.js index bd3d2db3b7429e..8964c5e5b82fc7 100644 --- a/packages/eslint-plugin/configs/custom.js +++ b/packages/eslint-plugin/configs/custom.js @@ -7,6 +7,7 @@ module.exports = { '@wordpress/no-global-active-element': 'error', '@wordpress/no-global-get-selection': 'error', '@wordpress/no-global-event-listener': 'warn', + '@wordpress/no-unsafe-wp-apis': 'error', }, overrides: [ {