-
Notifications
You must be signed in to change notification settings - Fork 1
chore: cleanup dependencies with built-in replacements #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 784ba4d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
commit: |
bd1faa6
to
01f8e88
Compare
Signed-off-by: JounQin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The PR removes several polyfill dependencies in favor of native built-in APIs and cleans up related code and configs.
- Replaced
safe-regex-test
,string.prototype.includes
,object.entries
,object.fromentries
, andobject.assign
imports with nativeRegExp.prototype.test
,String.prototype.includes
,Object.entries
,Object.fromEntries
, andObject.assign
. - Removed unnecessary ESLint disable comments and updated configs (Babel preset, ESLint resolver, ignored folders).
- Updated scripts, mocks, and tests to use built-ins and cleaned up package.json devDependencies.
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/rules/tabindex-no-positive.js | Removed ESLint disable and still using global isNaN |
src/rules/img-redundant-alt.js | Swapped safeRegexTest /stringIncludes for RegExp.test /includes |
src/rules/aria-proptypes.js | Removed ESLint disable; kept global isNaN call |
src/rules/anchor-is-valid.js | Replaced safeRegexTest import with native RegExp literal |
src/rules/accessible-emoji.js | Swapped safeRegexTest for native emojiRegex().test |
src/index.js | Dropped eslint-disable global-require comment |
scripts/create-rule.js | Removed ESLint disables around minimist , jscodeshift , and console.error |
package.json | Deleted polyfill deps; added @babel/preset-env |
eslint.config.js | Added TypeScript import resolver, updated ignores/globals format |
babel.config.js | Switched from Airbnb preset to @babel/env |
tests/src/rules/label-has-for-test.js | Replaced object.assign import with Object.assign |
tests/index-test.js | Removed ESLint disable on dynamic requires |
tests/util/ruleOptionsMapperFactory.js | Replaced object.entries /object.fromentries with native APIs |
tests/util/helpers/parsers.js | Replaced entries import with Object.entries |
tests/util/helpers/getESLintCoreRule.js | Removed ESLint disable comment |
tests/util/helpers/axeMapping.js | Deleted no-underscore-dangle disable |
mocks/genInteractives.js | Swapped fromEntries import for Object.fromEntries |
mocks/JSXAttributeMock.js | Removed eslint-disable on to-ast import |
.changeset/brown-walls-float.md | Added changeset entry for dependency cleanup |
Comments suppressed due to low confidence (2)
src/rules/tabindex-no-positive.js:38
- Use Number.isNaN(value) instead of the global isNaN to avoid unexpected coercion and satisfy strict lint rules.
if (isNaN(value) || value <= 0) {
src/rules/aria-proptypes.js:49
- Prefer using Number.isNaN(Number(value)) for a more accurate NaN check and to avoid reliance on the global isNaN.
return typeof value !== 'boolean' && isNaN(Number(value)) === false;
close #16