Skip to content

Commit de18c26

Browse files
committed
fix: support eslint 10 dependency update
1 parent 5373a3e commit de18c26

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/surge-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Build preview
3838
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
3939
run: |
40-
npm install
40+
npm install --legacy-peer-deps
4141
npm run build
4242
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
4343
if: ${{ steps.surge-token.outputs.enabled == 'true' }}

eslint.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import js from '@eslint/js';
2+
import { fixupConfigRules } from '@eslint/compat';
23
import { defineConfig } from 'eslint/config';
34
import { dirname } from 'node:path';
45
import { fileURLToPath } from 'node:url';
@@ -41,8 +42,8 @@ export default defineConfig([
4142
files: ['**/*.{js,jsx,ts,tsx}'],
4243
extends: [
4344
js.configs.recommended,
44-
react.configs.flat.recommended,
45-
react.configs.flat['jsx-runtime'],
45+
...fixupConfigRules(react.configs.flat.recommended),
46+
...fixupConfigRules(react.configs.flat['jsx-runtime']),
4647
prettier,
4748
],
4849
plugins: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
},
7373
"devDependencies": {
7474
"@eslint/js": "^10.0.1",
75+
"@eslint/compat": "^2.1.0",
7576
"@rc-component/father-plugin": "^2.2.0",
7677
"@rc-component/np": "^1.0.4",
7778
"@rc-component/select": "^1.8.0",

0 commit comments

Comments
 (0)