Skip to content

Commit

Permalink
dev: updates devDependencies, migrates to eslint.config.js, fixes sec…
Browse files Browse the repository at this point in the history
…urity vulns
  • Loading branch information
webketje committed Nov 4, 2024
1 parent c5286a3 commit 7eb03a9
Show file tree
Hide file tree
Showing 7 changed files with 2,993 additions and 2,904 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

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

This file was deleted.

59 changes: 59 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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', 'test/fixtures'],
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-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],
'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 7eb03a9

Please sign in to comment.