Skip to content

Commit

Permalink
Plugin: Remove ESLint rule for deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Jan 10, 2025
1 parent 3a0fb96 commit d0ea03e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@
const glob = require( 'glob' ).sync;
const { join } = require( 'path' );

/**
* Internal dependencies
*/
const { version } = require( './package' );

/**
* Regular expression string matching a SemVer string with equal major/minor to
* the current package version. Used in identifying deprecations.
*
* @type {string}
*/
const majorMinorRegExp =
version.replace( /\.\d+$/, '' ).replace( /[\\^$.*+?()[\]{}|]/g, '\\$&' ) +
'(\\.\\d+)?';

/**
* The list of patterns matching files used only for development purposes.
*
Expand Down Expand Up @@ -92,14 +77,6 @@ const restrictedSyntax = [
'ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]',
message: 'Path access on WordPress dependencies is not allowed.',
},
{
selector:
'CallExpression[callee.name="deprecated"] Property[key.name="version"][value.value=/' +
majorMinorRegExp +
'/]',
message:
'Deprecated functions must be removed before releasing this version.',
},
{
selector:
'CallExpression[callee.object.name="page"][callee.property.name="waitFor"]',
Expand Down

0 comments on commit d0ea03e

Please sign in to comment.