Skip to content

Commit ccd7702

Browse files
committed
chore: update ESLint dependencies
1 parent 807385d commit ccd7702

File tree

6 files changed

+51
-64
lines changed

6 files changed

+51
-64
lines changed

.github/workflows/CI.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,39 @@ jobs:
1111
name: Keep Latest
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v1
16-
with: { fetch-depth: 1 }
17-
- name: Install Node.js
18-
uses: actions/setup-node@v1
19-
with: { node-version: 12.x }
20-
- name: Install Packages
21-
run: npm install
22-
- name: Check ESLint Version
23-
uses: ./.github/actions/get-eslint-versions
24-
id: versions
25-
- name: Test
26-
run: npm test
27-
if: success() && steps.versions.outputs.installed != steps.versions.outputs.published
28-
- name: Bump Version
29-
run: |
30-
if ! git diff --exit-code --quiet
31-
then
32-
git config user.name "${GITHUB_ACTOR}"
33-
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
34-
git add .
35-
git commit -m "🔖 ${VERSION}"
36-
git tag "v$VERSION"
37-
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:master "v${VERSION}"
38-
fi
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
VERSION: ${{ steps.versions.outputs.installed }}
42-
if: success() && steps.versions.outputs.installed != steps.versions.outputs.published
43-
- name: Publish
44-
run: |
45-
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
46-
npm publish
47-
env:
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49-
if: success() && steps.versions.outputs.installed != steps.versions.outputs.published
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Install Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 16
20+
- name: Install Packages
21+
run: npm install
22+
- name: Check ESLint Version
23+
uses: ./.github/actions/get-eslint-versions
24+
id: versions
25+
- name: Test
26+
run: npm test
27+
if: success() && steps.versions.outputs.installed != steps.versions.outputs.published
28+
- name: Bump Version
29+
run: |
30+
if ! git diff --exit-code --quiet
31+
then
32+
git config user.name "${GITHUB_ACTOR}"
33+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
34+
git add .
35+
git commit -m "🔖 ${VERSION}"
36+
git tag "v$VERSION"
37+
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:master "v${VERSION}"
38+
fi
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
VERSION: ${{ steps.versions.outputs.installed }}
42+
if: success() && steps.versions.outputs.installed != steps.versions.outputs.published
43+
- name: Publish
44+
run: |
45+
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
46+
npm publish
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
if: success() && steps.versions.outputs.installed != steps.versions.outputs.published

.last-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.32.0
1+
8.0.0-beta.0

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "eslint4b",
3-
"version": "7.32.0",
3+
"version": "8.0.0-beta.0",
44
"description": "ESLint which works in browsers.",
55
"engines": {
6-
"node": "^10.12.0 || >=12.0.0"
6+
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
77
},
88
"main": "dist/index.js",
99
"files": [
@@ -13,10 +13,10 @@
1313
"debug": "^4.3.2",
1414
"doctrine": "^3.0.0",
1515
"escape-string-regexp": "^4.0.0",
16-
"eslint-scope": "^5.1.1",
17-
"eslint-utils": "^2.1.0",
18-
"eslint-visitor-keys": "^2.1.0",
19-
"espree": "^7.3.1",
16+
"eslint-scope": "^6.0.0",
17+
"eslint-utils": "^3.0.0",
18+
"eslint-visitor-keys": "^3.0.0",
19+
"espree": "^8.0.0",
2020
"esquery": "^1.4.0",
2121
"esutils": "^2.0.3",
2222
"functional-red-black-tree": "^1.0.1",
@@ -30,12 +30,12 @@
3030
"devDependencies": {
3131
"@actions/core": "^1.5.0",
3232
"@babel/core": "^7.15.0",
33-
"@mysticatea/eslint-plugin": "^11.0.0",
33+
"@mysticatea/eslint-plugin": "^13.0.0",
3434
"@types/node": "^12.20.20",
3535
"babel-plugin-minify-constant-folding": "^0.5.0",
3636
"babel-plugin-minify-dead-code-elimination": "^0.5.1",
3737
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
38-
"eslint": "^7.32.0",
38+
"eslint": "^8.0.0-beta.0",
3939
"fancy-log": "^1.3.3",
4040
"fs-extra": "^9.1.0",
4141
"karma": "^5.2.3",

scripts/build.js

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
const path = require("path")
88
const babel = require("@babel/core")
9+
const { builtinRules } = require("eslint/use-at-your-own-risk");
910
const log = require("fancy-log")
1011
const fs = require("fs-extra")
1112
const rollup = require("rollup")
@@ -30,26 +31,13 @@ const resolve = require("./rollup-plugin/resolve")
3031
//--------------------------------------------------------------------------
3132
log.info("Update 'scripts/shim/core-rules.js'.")
3233

33-
const ruleDir = path.resolve("node_modules/eslint/lib/rules")
34-
const ruleIds = (await fs.readdir(ruleDir))
35-
.filter(
36-
filename =>
37-
/^[a-z-]+\.js$/u.test(filename) && filename !== "index.js",
38-
)
39-
.map(filename => path.basename(filename, ".js"))
40-
const importDecls = ruleIds
41-
.map(
42-
(ruleId, index) =>
43-
`import _${index} from "eslint/lib/rules/${ruleId}"`,
44-
)
45-
.join("\n")
46-
const exportDecls = ruleIds
47-
.map((ruleId, index) => ` "${ruleId}": _${index},`)
34+
const exportDecls = [...builtinRules.keys()]
35+
.map((ruleId) => ` "${ruleId}": builtinRules.get("${ruleId}"),`)
4836
.join("\n")
4937

5038
await fs.writeFile(
5139
"scripts/shim/core-rules.js",
52-
`${importDecls}\nexport default {\n${exportDecls}\n}\n`,
40+
`const { builtinRules } = require("eslint/use-at-your-own-risk")\nexport default {\n${exportDecls}\n}\n`,
5341
)
5442

5543
//--------------------------------------------------------------------------
@@ -81,7 +69,6 @@ const resolve = require("./rollup-plugin/resolve")
8169
plugins: [
8270
replace({
8371
debug: "./scripts/shim/debug.js",
84-
"eslint/lib/rules/index.js": "./scripts/shim/rules-index.js",
8572
}),
8673
resolve(),
8774
modify({

scripts/shim/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Linter as BaseLinter } from "eslint/lib/linter"
1+
import { Linter as BaseLinter } from "eslint"
22
import coreRules from "./core-rules"
33

44
/**

scripts/shim/linter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import { Linter } from "eslint/lib/linter"
1+
import { Linter } from "eslint"
22
export default Linter

0 commit comments

Comments
 (0)