Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .eslintrc.js

This file was deleted.

40 changes: 20 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Run Tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
push:
branches: ['master']
pull_request:
branches: ['master']

jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v3
strategy:
matrix:
node-version: [20.x, 22.x]

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3

- name: Test
run: |
npm install
npm test
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Test
run: |
npm install
npm test
76 changes: 76 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ['**/lib/'],
},
...compat.extends(
'eslint:recommended',
'plugin:eslint-plugin/recommended',
'plugin:node/recommended',
'plugin:prettier/recommended'
),
{
languageOptions: {
globals: {
...globals.node,
},

ecmaVersion: 2021,
sourceType: 'module',
},

settings: {
node: {
tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts'],
},
},

rules: {
'prettier/prettier': 0,
'eslint-plugin/prefer-message-ids': 1,
},
},
{
files: ['test/**/*.js'],

languageOptions: {
globals: {
...globals.mocha,
},
},
},
...compat.extends('plugin:@typescript-eslint/recommended').map((config) => ({
...config,
files: ['**/*.ts'],
})),
{
files: ['**/*.ts'],

languageOptions: {
parser: tsParser,
},

rules: {
'node/no-unsupported-features/es-syntax': [
'error',
{
ignores: ['modules'],
},
],
},
},
];
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const DEST = 'lib';
const tsProject = ts.createProject('tsconfig.json');

gulp.task('clean', function (done) {
rimraf(DEST, done);
rimraf.rimraf(DEST).then(() => done());
});

gulp.task(
Expand Down
Loading
Loading