Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/update-eslint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update electron
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
name: Update electron
name: Update eslint

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TY! Fixed


# 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
Copy link
Collaborator Author

@gribnoysup gribnoysup May 22, 2025

Choose a reason for hiding this comment

The 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should also be different?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, thanks for spotting!

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
12 changes: 11 additions & 1 deletion configs/eslint-config-compass/bin/eslint.js
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, '...');
if (!process.argv.includes('--resolve-plugins-relative-to')) {
process.argv.push('--resolve-plugins-relative-to', sharedEslintConfigPath);
}
require(eslintBinPath);
8 changes: 4 additions & 4 deletions configs/eslint-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"@mongodb-js/eslint-plugin-compass": "^1.2.8",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"eslint": "^7.25.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-filename-rules": "^1.2.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0"
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^4.6.2"
},
"scripts": {
"prettier": "prettier-compass",
Expand Down
2 changes: 1 addition & 1 deletion configs/eslint-plugin-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@mongodb-js/mocha-config-compass": "^1.6.8",
"@mongodb-js/prettier-config-compass": "^1.2.8",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"eslint": "^8.57.1",
"mocha": "^10.2.0",
"nyc": "^15.1.0"
}
Expand Down
Loading
Loading