Skip to content

Commit

Permalink
Only run linting on node 14
Browse files Browse the repository at this point in the history
This works around an issue with node/no-missing-import that doesn't
properly see that `node:path` is a valid module on Node 12.x.

They are using `is-core-module` to figure out if it is a module or not,
and it seems that `is-core-module` doesn't differentiate between core
modules that are available for CJS (the `node:` prefixed paths are only
available in 14.18+ and 16+ in CJS files) and those that are available
to ESM.

This is really just a bandaid, the right fix would be to send a PR to
is-core-module to allow it to check CJS vs MJS modules (since they are
actually different).

See mysticatea/eslint-plugin-node#299
  • Loading branch information
rwjblue committed Oct 15, 2021
1 parent 1909f53 commit a8b3cc7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -7,6 +7,17 @@ on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
- run: npm run lint:js

build:
name: "Node ${{ matrix.node-version }}"

Expand All @@ -23,7 +34,6 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: install dependencies
run: npm ci
- run: npm run lint:js
- run: npm test

release-it-compat:
Expand All @@ -43,5 +53,4 @@ jobs:
- name: install dependencies
run: npm ci
- run: npm install --saveDev release-it@${{ matrix.release-it-version }}
- run: npm run lint:js
- run: npm test

0 comments on commit a8b3cc7

Please sign in to comment.