Skip to content

Commit

Permalink
use eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
furudean committed Aug 12, 2024
1 parent 591109e commit f3e1e7c
Show file tree
Hide file tree
Showing 11 changed files with 489 additions and 401 deletions.
36 changes: 8 additions & 28 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
import globals from 'globals'
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'

export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ ignores: ['out', 'dist'] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
globals: {
...Object.fromEntries(
Object.entries(globals.browser).map(([key]) => [key, 'off'])
),
...globals.commonjs,
...globals.node,
...globals.mocha,
},

ecmaVersion: 2018,
sourceType: 'module',

parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},

rules: {
'no-const-assign': 'warn',
'no-this-before-super': 'warn',
'no-undef': 'warn',
'no-unreachable': 'warn',
'no-unused-vars': 'warn',
'constructor-super': 'warn',
'valid-typeof': 'warn',
'@typescript-eslint/no-require-imports': 'off',
},
ignores: ['out', 'dist', '**/*.d.ts', '.vscode-test/'],
},
]
Loading

0 comments on commit f3e1e7c

Please sign in to comment.