Skip to content

Commit

Permalink
upgrade eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
bcherny committed Aug 30, 2024
1 parent 0f5eacc commit bfbf690
Show file tree
Hide file tree
Showing 5 changed files with 1,266 additions and 734 deletions.
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import eslintConfigPrettier from 'eslint-config-prettier'
import js from '@eslint/js'
import globals from 'globals'
import tseslint from 'typescript-eslint'

export default [
js.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
ignores: ['dist'],
},
{
languageOptions: {
ecmaVersion: 2020,
globals: {
...globals.browser,
...globals.node,
},
parser: tsParser,
sourceType: 'module',
parserOptions: {
project: './tsconfig.json',
},
},
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
camelcase: 'off',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/naming-convention': 'off',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-this-alias': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'no-var': 'error',
'prefer-const': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
},
},
]
Loading

0 comments on commit bfbf690

Please sign in to comment.