Skip to content

Commit d4ce02a

Browse files
chore: upgrade dependencies (#107)
Upgrade to ESLint 9 and Node 24 for actions, among other bumps
1 parent 8a7806b commit d4ce02a

File tree

12 files changed

+1427
-3920
lines changed

12 files changed

+1427
-3920
lines changed

.eslintrc.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3838

3939
steps:
40-
- name: Checkout repository
40+
- name: Check out repository
4141
uses: actions/checkout@v3
4242

4343
# Initializes the CodeQL tools for scanning.
@@ -48,11 +48,11 @@ jobs:
4848
# If you wish to specify custom queries, you can do so here or in a config file.
4949
# By default, queries listed here will override any specified in a config file.
5050
# Prefix the list here with "+" to use these queries and those in the config file.
51-
51+
5252
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5353
# queries: security-extended,security-and-quality
5454

55-
55+
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
@@ -61,7 +61,7 @@ jobs:
6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6363

64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
64+
# If the Autobuild fails above, remove it and uncomment the following three lines.
6565
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6666

6767
# - run: |

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
name: lint
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: Checkout Project
18+
- name: Check out repository
1919
uses: actions/checkout@v3
20-
- name: Use Node.js 16
20+
- name: Use Node.js 24
2121
uses: actions/[email protected]
2222
with:
23-
node-version: 16
23+
node-version: 24
2424
- name: Install dependencies
2525
run: npm i
2626
- name: Lint checks

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
name: test
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Checkout Project
14+
- name: Check out repository
1515
uses: actions/checkout@v3
16-
- name: Use Node.js 16
16+
- name: Use Node.js 24
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: 16
19+
node-version: 24
2020
- name: Install dependencies
2121
run: npm ci
2222
- name: Run tests

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ dist
106106
# MacOS .DS_Store files
107107
.DS_Store
108108

109-
# Custom files I don't want added to npm
110-
.vscode/
109+
# Custom files I don't want added to git
111110
sandbox.js
112111
TODO

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Custom files I don't want added to the npm package
2+
.vscode/
3+
.github/
4+
.nvmrc

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cSpell.words": [
3+
"Diffbot"
4+
]
5+
}

eslint.config.cjs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
const {
2+
defineConfig,
3+
} = require('eslint/config');
4+
5+
const globals = require('globals');
6+
const js = require('@eslint/js');
7+
8+
const {
9+
FlatCompat,
10+
} = require('@eslint/eslintrc');
11+
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all
16+
});
17+
18+
module.exports = defineConfig([{
19+
extends: compat.extends('eslint:recommended'),
20+
21+
languageOptions: {
22+
globals: {
23+
...globals.browser,
24+
...globals.commonjs,
25+
...globals.node,
26+
...globals.mocha,
27+
Atomics: 'readonly',
28+
SharedArrayBuffer: 'readonly',
29+
},
30+
31+
ecmaVersion: 2018,
32+
sourceType: 'commonjs',
33+
34+
parserOptions: {
35+
allowImportExportEverywhere: false,
36+
codeFrame: false,
37+
38+
ecmaFeatures: {
39+
modules: true,
40+
blockBindings: true,
41+
},
42+
},
43+
},
44+
45+
rules: {
46+
indent: ['warn', 2, {
47+
SwitchCase: 1,
48+
}],
49+
50+
'linebreak-style': ['error', 'unix'],
51+
quotes: ['error', 'single'],
52+
semi: ['error', 'always'],
53+
'no-console': 'error',
54+
},
55+
}]);

0 commit comments

Comments
 (0)