Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XO #1562

Merged
merged 6 commits into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix this in another PR

}
}
]
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