github / eslint-plugin-github

An opinionated collection of ESLint rules used by GitHub.
MIT License
286 stars 51 forks source link

Fix bug in `getElementType` logic #525

Closed khiga8 closed 1 month ago

khiga8 commented 1 month ago

This PR fixes a few issues:

1. Fixing bug in getElementType logic

const mapping = {
  'Box': 'div'
}
<Box as={something} />

will be interpreted as div. Currently the linter will check the mapping if it is unable to interpret the polymorphic value. However, it should not do that because that is not a correct interpretation.

2. Fixing mjs tests that aren't running

I noticed the tests in utils aren't running even when calling npm run test.

This seems related to this change where the tests were converted to .mjs, but the .mjs tests aren't actually running. When I fixed the command, the tests are being targeted. The test will not run properly without the .js extension.

3. Drops node 14 support

Drops node 14 support per slack thread!

4. Adds node 16 support

khiga8 commented 1 month ago

@github/web-systems-reviewers

Node 14 builds seem to be failing. Can we drop support?

--

The answer is yes! slack thread!

accessibility-bot commented 1 month ago

:wave: Hello and thanks for pinging us! You've entered our first responder queue. An accessibility first responder will review this soon.