Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Linting is ran as part of `yarn run test`. The build will fail if there are any

## Publishing

- Ensure you are on the master branch locally.
- Ensure you are on the main branch locally.
- Update `CHANGELOG.md` and commit.
- Run the following:

Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test

on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 22
- 20
- 18
- 16
- 14
- 12
- 10
- 8
- 6

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- run: yarn install --frozen-lockfile --ignore-engines

- run: yarn lint
if: matrix.node-version == 22

- run: yarn add mocha@5 --dev --ignore-engines
if: matrix.node-version < 14

- run: yarn run test
6 changes: 3 additions & 3 deletions dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "monthly"
interval: 'monthly'
31 changes: 31 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import eslintJs from '@eslint/js';
import eslintPluginN from 'eslint-plugin-n';
import globals from 'globals';
import eslintConfigPrettier from 'eslint-config-prettier';

export default [
eslintJs.configs.recommended,
eslintPluginN.configs['flat/recommended'],
eslintConfigPrettier,
{
languageOptions: {
globals: {
...globals.mocha,
},
},
settings: {
node: {version: '6'},
},
},
{
files: ['**/*.mjs'],
languageOptions: {sourceType: 'module'},
settings: {
node: {version: '22'},
},
rules: {
'n/no-unpublished-import': 'off',
'n/no-extraneous-import': 'off',
},
},
];
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"main": "index.js",
"license": "MIT",
"scripts": {
"lint": "eslint .",
"test": "npm run lint && mocha",
"format": "yarn run prettier '**/*.{js,json,md,yml}' --write && yarn run lint --fix"
"lint": "eslint . && prettier . --check",
"test": "mocha",
"format": "eslint . --fix && prettier . --write"
},
"repository": {
"type": "git",
Expand All @@ -25,12 +25,12 @@
"fast-diff": "^1.1.2"
},
"devDependencies": {
"eslint": "^5.6.1",
"eslint-config-prettier": "^6.4.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-prettier": "^3.1.1",
"mocha": "^5.2.0",
"prettier": "^1.14.3"
"@eslint/js": "^9.21.0",
"eslint": "^9.21.0",
"eslint-config-prettier": "^10.0.2",
"eslint-plugin-n": "^17.16.2",
"mocha": "^11.1.0",
"prettier": "^3.5.3"
},
"engines": {
"node": ">=6.0.0"
Expand Down
Loading