-
Notifications
You must be signed in to change notification settings - Fork 247
chore(eslint-config): update eslint to 8 #6942
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
Changes from 3 commits
8013236
b63c4b0
8f8c59d
4b471f8
b471eba
87aeb40
c8e6e24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Update electron | ||
|
|
||
| # Runs nightly and manually | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
|
|
||
| permissions: | ||
| contents: none # We use the github app token to push the changes | ||
|
|
||
| jobs: | ||
| update_eslint: | ||
| name: Update ESLint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Create Github App Token | ||
| uses: mongodb-js/devtools-shared/actions/setup-bot-token@main | ||
|
||
| id: app-token | ||
| with: | ||
| app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }} | ||
| private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }} | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| # don't checkout a detatched HEAD | ||
| ref: ${{ github.head_ref || github.ref_name }} | ||
| token: ${{ steps.app-token.outputs.token }} | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22.15.1 | ||
| cache: 'npm' | ||
|
|
||
| - name: Install [email protected] | ||
| run: | | ||
| npm install -g [email protected] | ||
| - name: Bump eslint | ||
| run: | | ||
| npm i --save eslint@8 -w @mongodb-js/eslint-config-compass | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll add more related packages here after I'm done updating them, for now it's only eslint that we can autoupdate |
||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5 | ||
| with: | ||
| token: ${{ steps.app-token.outputs.token }} | ||
| commit-message: 'chore(deps): update eslint' | ||
| branch: ci/update-electron | ||
|
||
| title: 'chore(deps): update eslint' | ||
| labels: no-title-validation | ||
| author: '${{ steps.app-token.outputs.app-slug}}[bot] <${{ steps.app-token.outputs.app-email }}>' | ||
| body: | | ||
| - Update ESLint to latest 8 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,13 @@ | ||
| #!/usr/bin/env node | ||
| 'use strict'; | ||
| require('eslint/bin/eslint.js'); | ||
| const path = require('path'); | ||
| const eslintPkgJson = require('eslint/package.json'); | ||
| const eslintBinPath = path.resolve( | ||
| path.dirname(require.resolve('eslint/package.json')), | ||
| eslintPkgJson.bin.eslint | ||
| ); | ||
| const sharedEslintConfigPath = path.resolve(__dirname, '...'); | ||
addaleax marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if (!process.argv.includes('--resolve-plugins-relative-to')) { | ||
| process.argv.push('--resolve-plugins-relative-to', sharedEslintConfigPath); | ||
gribnoysup marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| require(eslintBinPath); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TY! Fixed