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.

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

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'npm'
- name: Install
run: npm install
Expand All @@ -34,7 +34,7 @@ jobs:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'npm'
- name: Install
run: npm install
Expand All @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18, 20]
node: [20, 22, 24]
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -67,31 +67,31 @@ jobs:
run: npm run test:node

test_macos:
name: Test on MacOS with Node 16
name: Test on MacOS with Node 20
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'npm'
- name: Install
run: npm install
- name: Run tests
run: npm run test:node

test_windows:
name: Test on Windows with Node 16
name: Test on Windows with Node 20
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'npm'
- name: Install
run: npm install
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2018 Federico Bond
Copyright (c) 2025 Franco Victorio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
79 changes: 79 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { defineConfig, globalIgnores } from 'eslint/config'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
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 defineConfig([
globalIgnores(['src/antlr', '**/dist']),
{
extends: compat.extends('eslint:recommended'),

plugins: {
'@typescript-eslint': typescriptEslint,
},

languageOptions: {
globals: {
...globals.mocha,
...globals.node,
},

parser: tsParser,
},

rules: {
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'object-shorthand': 'error',
'prefer-const': 'error',
'max-len': 'off',
},
},
{
files: ['**/*.ts'],

extends: compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
),

plugins: {
'@typescript-eslint': typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: 'script',

parserOptions: {
project: ['./tsconfig.json'],
},
},

rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
])
Loading
Loading