Skip to content

Commit 241c6b8

Browse files
chore: housekeeping, upgrade all (dev) dependencies (#319)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: JounQin <[email protected]>
1 parent 9156ab4 commit 241c6b8

20 files changed

+1831
-857
lines changed

.eslintignore

-3
This file was deleted.

.eslintrc.base.js

+23-26
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,23 @@ module.exports = {
1414
"google",
1515
"plugin:flowtype/recommended",
1616
"plugin:react/all",
17-
"plugin:unicorn/recommended",
1817
"plugin:vue/recommended",
1918
],
2019
plugins: [
2120
"prettier",
2221
...new Set(
2322
Object.keys(config.rules)
2423
.map((ruleName) => ruleName.split("/"))
25-
.filter((parts) => parts.length > 1)
26-
.map((parts) => parts[0])
24+
.flatMap((parts) => {
25+
if (parts.length <= 1) {
26+
return [];
27+
}
28+
const pluginName = parts[0];
29+
// The following are ESM only without eslintrc supported now
30+
return ["@stylistic", "unicorn"].includes(pluginName)
31+
? []
32+
: pluginName;
33+
})
2734
),
2835
],
2936
parserOptions: {
@@ -38,6 +45,7 @@ module.exports = {
3845
"indent": "off",
3946
"linebreak-style": "off",
4047
"no-dupe-keys": "error",
48+
"no-unused-vars": "off",
4149
"strict": ["error", "global"],
4250
"prefer-spread": "off",
4351
"require-jsdoc": "off",
@@ -70,6 +78,8 @@ module.exports = {
7078
"object-curly-spacing": "off",
7179
"babel/object-curly-spacing": ["error", "never"],
7280
"@babel/object-curly-spacing": ["error", "never"],
81+
// removed in ESLint v9
82+
"valid-jsdoc": "off",
7383

7484
// Workaround: These rules are deprecated, but added by eslint-config-google.
7585
// We have to exclude them when testing the flat config, but also turn them
@@ -82,44 +92,31 @@ module.exports = {
8292
"max-len": "off",
8393
"operator-linebreak": "off",
8494
"quotes": "off",
95+
"space-before-function-paren": "off",
8596
}),
8697
},
8798
overrides: [
8899
{
89100
files: ["**/*.{ts,tsx}"],
90-
parserOptions: { parser: "@typescript-eslint/parser" },
91-
rules: {
92-
// Force a conflict with Prettier in test-lint/typescript.js.
93-
// This is included in "plugin:@typescript-eslint/recommended".
94-
"@typescript-eslint/indent": "error",
95-
},
101+
parser: "@typescript-eslint/parser",
96102
},
97103
{
98104
files: ["test-lint/{react,flowtype}.js", "test-lint/@stylistic__jsx.jsx"],
99-
parserOptions: { parser: "@babel/eslint-parser" },
100-
},
101-
{
102-
files: ["test-lint/@stylistic.js"],
103-
extends: ["plugin:@stylistic/all-extends"],
104-
},
105-
{
106-
files: ["test-lint/@stylistic__js.js"],
107-
extends: ["plugin:@stylistic/js/all-extends"],
108-
},
109-
{
110-
files: ["test-lint/@stylistic__jsx.jsx"],
111-
extends: ["plugin:@stylistic/jsx/all-extends"],
112-
},
113-
{
114-
files: ["test-lint/@stylistic__ts.ts"],
115-
extends: ["plugin:@stylistic/ts/all-extends"],
105+
parser: "@babel/eslint-parser",
116106
},
117107
{
118108
files: ["**/*.d.ts"],
119109
rules: {
120110
strict: "off",
121111
},
122112
},
113+
{
114+
files: ["**/*.d.ts", "**/*.mjs"],
115+
parserOptions: {
116+
ecmaVersion: 2020,
117+
sourceType: "module",
118+
},
119+
},
123120
],
124121
settings: {
125122
react: {

.github/workflows/check.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2222
with:
2323
persist-credentials: false
2424

25-
- uses: actions/setup-node@v4
25+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
2626
with:
2727
node-version: lts/*
2828
cache: yarn

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout Repo
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1515
with:
1616
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1717
fetch-depth: 0
1818

1919
- name: Setup Node.js LTS
20-
uses: actions/setup-node@v4
20+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
2121
with:
2222
node-version: lts/*
2323
cache: yarn

.github/workflows/test.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515

1616
jobs:
1717
test:
18-
name: Test on ${{ matrix.os }} with Node.js ${{ matrix.node-version }}
18+
name: Test on ${{ matrix.os }} with Node.js ${{ matrix.node }}
1919

2020
runs-on: ${{ matrix.os }}
2121

@@ -25,7 +25,7 @@ jobs:
2525
- macOS-latest
2626
- ubuntu-latest
2727
- windows-latest
28-
node-version:
28+
node:
2929
- 16
3030
- 18
3131
- 20
@@ -36,18 +36,22 @@ jobs:
3636
YARN_IGNORE_NODE: 1
3737

3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4040
with:
4141
persist-credentials: false
4242

43-
- uses: actions/setup-node@v4
43+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
4444
with:
45-
node-version: ${{ matrix.node-version }}
45+
node-version: ${{ matrix.node }}
4646
cache: yarn
4747

4848
- name: Install Dependencies
4949
run: yarn --immutable
5050

51+
- name: Downgrade for Node ${{ matrix.node }}
52+
if: ${{ matrix.node == 16 || matrix.node == 18 }}
53+
run: yarn add -D eslint@8 eslint-plugin-unicorn@56
54+
5155
- name: Jest - flat
5256
run: yarn test:jest
5357
env:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};

.yarnrc.yml

+5
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ enableTelemetry: false
22

33
nodeLinker: node-modules
44

5+
plugins:
6+
- checksum: 37b2361b1502b2054e6779788c0e9bdd6a90ce49852a8cad2feda79b0614ec94f06fb6e78951f5f95429c610d7934dd077caa47413a0227378a102c55161616d
7+
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
8+
spec: "https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js"
9+
510
yarnPath: .yarn/releases/yarn-4.7.0.cjs

eslint.base.config.js

-111
This file was deleted.

0 commit comments

Comments
 (0)