Skip to content

Commit

Permalink
dev: update devDependencies to latest, migrate to eslint.config.js, t…
Browse files Browse the repository at this point in the history
…est Node 20 in CI
  • Loading branch information
webketje committed Nov 4, 2024
1 parent 51a5ddb commit 06aaffb
Show file tree
Hide file tree
Showing 6 changed files with 3,927 additions and 3,464 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions .eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
node: ['14.14.0', '16.0', '18.0']
node: ['14.14.0', '16.0', '18.0', '20.0']
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
51 changes: 51 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import js from '@eslint/js'
import globals from 'globals'
import prettier from 'eslint-config-prettier'
import pluginImport from 'eslint-plugin-import'
import pluginNode from 'eslint-plugin-n'

const config = [
{
ignores: ['lib'],
languageOptions: {
globals: {
...globals.node
},

ecmaVersion: 2020,
sourceType: 'module'
},

rules: {
...js.configs.recommended.rules,
'no-console': 'error',
'prefer-const': 'error',
'no-var': 'error',
'no-use-before-define': 'error',
'no-await-in-loop': 'error',
'n/exports-style': [0, 'error'],
'import/first': 'error',
'import/no-anonymous-default-export': 'error',
'import/no-unassigned-import': 'error',
'import/no-internal-modules': [
'error',
{
allow: ['src/**']
}
]
},
plugins: {
import: pluginImport,
n: pluginNode,
prettier: prettier
}
},
{
files: ['test/{**/,}*.js'],
languageOptions: {
globals: { ...globals.mocha }
}
}
]

export default config
Loading

0 comments on commit 06aaffb

Please sign in to comment.