Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 769da24

Browse filesBrowse files
authored
Remove unnecessary code (#245)
* Remove unnecessary code * fix ci
1 parent 7e30c9f commit 769da24
Copy full SHA for 769da24

File tree

8 files changed

+168
-183
lines changed
Filter options

8 files changed

+168
-183
lines changed

‎.github/workflows/CI.yml

Copy file name to clipboardExpand all lines: .github/workflows/CI.yml
+24-4Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ jobs:
4040
- eslint: 9
4141
node: 'lts/*'
4242
os: macos-latest
43-
# On old ESLint versions
44-
- eslint: 8
45-
node: 'lts/*'
46-
os: ubuntu-latest
4743

4844
runs-on: ${{ matrix.os }}
4945
steps:
@@ -63,6 +59,30 @@ jobs:
6359
run: npm run -s build
6460
- name: Test
6561
run: npm run -s test:mocha
62+
test-for-old-eslint:
63+
name: Test
64+
strategy:
65+
matrix:
66+
eslint: [8]
67+
node: ['lts/*']
68+
os: [ubuntu-latest]
69+
70+
runs-on: ${{ matrix.os }}
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
- name: Checkout submodules
75+
run: git submodule update --init
76+
- name: Install Node.js v${{ matrix.node }}
77+
uses: actions/setup-node@v4
78+
with:
79+
node-version: ${{ matrix.node }}
80+
- name: Install Packages
81+
run: npm install -f
82+
- name: Install ESLint v${{ matrix.eslint }}
83+
run: node scripts/ci-install-eslint ${{ matrix.eslint }}
84+
- name: Test
85+
run: npm run -s test:debug
6686

6787
test-cov:
6888
name: Test and Send Coverage

‎package.json

Copy file name to clipboardExpand all lines: package.json
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"@eslint/eslintrc": "^3.2.0",
3131
"@eslint/js": "^9.19.0",
3232
"@types/debug": "^4.1.7",
33-
"@types/eslint": "^9.6.1",
3433
"@types/estree": "^1.0.0",
3534
"@types/lodash": "^4.14.186",
3635
"@types/mocha": "^9.0.0",

‎src/common/create-require.ts

Copy file name to clipboardExpand all lines: src/common/create-require.ts
-17Lines changed: 0 additions & 17 deletions
This file was deleted.

‎src/common/eslint-scope.ts

Copy file name to clipboardExpand all lines: src/common/eslint-scope.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as escope from "eslint-scope"
22
import { lte } from "semver"
3-
import { createRequire } from "./create-require"
43
import path from "path"
4+
import { createRequire } from "module"
55

66
type ESLintScope = typeof escope & {
77
version: string

‎src/common/espree.ts

Copy file name to clipboardExpand all lines: src/common/espree.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { ParserOptions } from "../common/parser-options"
22
// @ts-expect-error -- ignore
33
import * as dependencyEspree from "espree"
44
import { lte } from "semver"
5-
import { createRequire } from "./create-require"
65
import path from "path"
76
import type { BasicParserObject } from "./parser-object"
7+
import { createRequire } from "module"
88

99
type Espree = BasicParserObject & {
1010
latestEcmaVersion: number

‎test/ast.js

Copy file name to clipboardExpand all lines: test/ast.js
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,6 @@ describe("Template AST", () => {
300300
})
301301

302302
it("should scope in the correct.", () => {
303-
const version = require(`eslint/package.json`).version
304-
if (!semver.satisfies(version, ">=8")) {
305-
return
306-
}
307303
const resultPath = path.join(ROOT, `${name}/scope.json`)
308304
if (!fs.existsSync(resultPath)) {
309305
return

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.