Skip to content

Commit 4bec7ae

Browse files
authored
Update XO (#1562)
1 parent 5892746 commit 4bec7ae

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/setup-node@v2
2525
with:
2626
node-version: ${{ matrix.node-version }}
27-
- run: npm install --legacy-peer-deps
27+
- run: npm install
2828
- run: npx ava
2929
lint-test:
3030
runs-on: ubuntu-latest
@@ -33,8 +33,8 @@ jobs:
3333
- uses: actions/setup-node@v2
3434
with:
3535
node-version: 16
36-
- run: npm install --legacy-peer-deps
37-
# - run: npx xo
36+
- run: npm install
37+
- run: npx xo
3838
# Force update snapshots, https://github.com/avajs/ava/discussions/2754
3939
- run: npx nyc ava --update-snapshots
4040
env:
@@ -45,19 +45,17 @@ jobs:
4545
- uses: codecov/codecov-action@v1
4646
with:
4747
fail_ci_if_error: true
48-
# `xo` can't work on ESLint 8
49-
- run: npm install eslint@7 && npx xo
5048
run-rules-on-codebase:
5149
runs-on: ubuntu-latest
5250
steps:
5351
- uses: actions/checkout@v2
5452
- uses: actions/setup-node@v2
55-
- run: npm install --legacy-peer-deps
53+
- run: npm install
5654
- run: npm run run-rules-on-codebase
5755
integration:
5856
runs-on: ubuntu-latest
5957
steps:
6058
- uses: actions/checkout@v2
6159
- uses: actions/setup-node@v2
62-
- run: npm install --legacy-peer-deps
60+
- run: npm install
6361
- run: npm run integration

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"outdent": "^0.8.0",
7777
"typescript": "^4.4.2",
7878
"vue-eslint-parser": "^8.0.0",
79-
"xo": "^0.44.0"
79+
"xo": "^0.46.3"
8080
},
8181
"peerDependencies": {
8282
"eslint": ">=7.32.0"
@@ -134,7 +134,8 @@
134134
],
135135
"eslint-plugin/require-meta-docs-url": "off",
136136
"eslint-plugin/require-meta-has-suggestions": "off",
137-
"eslint-plugin/require-meta-schema": "off"
137+
"eslint-plugin/require-meta-schema": "off",
138+
"eslint-plugin/no-deprecated-context-methods": "off"
138139
}
139140
}
140141
]

rules/prefer-spread.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ const create = context => {
446446
return;
447447
}
448448

449+
// eslint-disable-next-line unicorn/prefer-spread
449450
const resultBySplit = value.split('');
450451
const resultBySpread = [...value];
451452

test/run-rules-on-codebase/lint.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,6 @@ const eslint = new ESLint({
6161
'unicorn/prefer-module': 'off',
6262
},
6363
},
64-
{
65-
files: [
66-
'rules/prefer-spread.js',
67-
],
68-
rules: {
69-
// TODO[xo@>=0.45.0]: Enable this rule when `xo` updated `eslint-plugin-unicorn`
70-
'unicorn/prefer-spread': 'off',
71-
},
72-
},
7364
],
7465
},
7566
});

0 commit comments

Comments
 (0)