Skip to content

Commit

Permalink
chore: a few review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Jan 5, 2024
1 parent 7b96327 commit 972d897
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
eslint: [8.x]
eslint: [8.x, "9.0.0-alpha.0"]
node: [18.x, 20.x]
include:
- os: ubuntu-latest
node: "21.x"
eslint: "8.x"
- os: ubuntu-latest
node: "20.x"
eslint: "9.0.0-alpha.0"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -50,6 +47,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: npm latest
run: npm i -g npm@latest # use latest npm
- name: Install Packages
run: npm install
- name: Install ESLint ${{ matrix.eslint }}
Expand Down
4 changes: 1 addition & 3 deletions tests/eslint-rule-tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ const globals = require("globals")
// greater than or equal to ESLint v9
exports.gteEslintV9 = +eslintVersion.split(".")[0] >= 9

exports.FlatRuleTester = exports.gteEslintV9
? RuleTester
: unofficialApis.FlatRuleTester
exports.FlatRuleTester = exports.gteEslintV9 ? RuleTester : FlatRuleTester

// to support the `env:{ es6: true, node: true}` rule-tester (env has been away in flat config.)
// * enabled by default as it's most commonly used in the package.
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/rules/no-unpublished-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"use strict"

const path = require("path")
const globals = require("globals")
const RuleTester = require("#eslint-rule-tester").RuleTester
const rule = require("../../../lib/rules/no-unpublished-require")

Expand Down Expand Up @@ -182,7 +181,6 @@ ruleTester.run("no-unpublished-require", rule, {
{
filename: fixture("1/test.js"),
code: "require(`foo${bar}`);",
languageOptions: { globals: globals.node },
},

// Should work fine if the filename is relative.
Expand Down

0 comments on commit 972d897

Please sign in to comment.