Skip to content

Commit

Permalink
Update XO (#1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Oct 29, 2021
1 parent 5892746 commit 4bec7ae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install --legacy-peer-deps
- run: npm install
- run: npx ava
lint-test:
runs-on: ubuntu-latest
Expand All @@ -33,8 +33,8 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm install --legacy-peer-deps
# - run: npx xo
- run: npm install
- run: npx xo
# Force update snapshots, https://github.com/avajs/ava/discussions/2754
- run: npx nyc ava --update-snapshots
env:
Expand All @@ -45,19 +45,17 @@ jobs:
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
# `xo` can't work on ESLint 8
- run: npm install eslint@7 && npx xo
run-rules-on-codebase:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm install --legacy-peer-deps
- run: npm install
- run: npm run run-rules-on-codebase
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm install --legacy-peer-deps
- run: npm install
- run: npm run integration
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"outdent": "^0.8.0",
"typescript": "^4.4.2",
"vue-eslint-parser": "^8.0.0",
"xo": "^0.44.0"
"xo": "^0.46.3"
},
"peerDependencies": {
"eslint": ">=7.32.0"
Expand Down Expand Up @@ -134,7 +134,8 @@
],
"eslint-plugin/require-meta-docs-url": "off",
"eslint-plugin/require-meta-has-suggestions": "off",
"eslint-plugin/require-meta-schema": "off"
"eslint-plugin/require-meta-schema": "off",
"eslint-plugin/no-deprecated-context-methods": "off"
}
}
]
Expand Down
1 change: 1 addition & 0 deletions rules/prefer-spread.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ const create = context => {
return;
}

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

Expand Down
9 changes: 0 additions & 9 deletions test/run-rules-on-codebase/lint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ const eslint = new ESLint({
'unicorn/prefer-module': 'off',
},
},
{
files: [
'rules/prefer-spread.js',
],
rules: {
// TODO[xo@>=0.45.0]: Enable this rule when `xo` updated `eslint-plugin-unicorn`
'unicorn/prefer-spread': 'off',
},
},
],
},
});
Expand Down

0 comments on commit 4bec7ae

Please sign in to comment.