Skip to content

Commit

Permalink
dev: updates devDependencies, migratest to eslint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed Nov 1, 2024
1 parent ce256db commit c3881c2
Show file tree
Hide file tree
Showing 6 changed files with 4,191 additions and 3,947 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

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

This file was deleted.

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 c3881c2

Please sign in to comment.