Skip to content

Commit

Permalink
test: check code with ESLint
Browse files Browse the repository at this point in the history
`npm run lint:eslint` (run as part of `npm lint` and `npm test`) now
checks our code with ESLint.

This also fixes or disables all lint failures.
  • Loading branch information
EvanHahn committed Sep 5, 2024
1 parent 9e78a72 commit bd76d22
Show file tree
Hide file tree
Showing 13 changed files with 536 additions and 275 deletions.
31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import globals from 'globals'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'

export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['dist/', 'generated/', 'intermediate/'],
},
{
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': false,
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
},
},
]
Loading

0 comments on commit bd76d22

Please sign in to comment.