Skip to content

Commit

Permalink
Eslint update (#20)
Browse files Browse the repository at this point in the history
* updated to latest eslint
* optimized with init @eslint/config@latest
  • Loading branch information
maddin1502 authored Oct 16, 2024
1 parent 4a03fa3 commit 4dfe888
Show file tree
Hide file tree
Showing 6 changed files with 706 additions and 602 deletions.
45 changes: 0 additions & 45 deletions .eslintrc

This file was deleted.

52 changes: 52 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint, { parser } from 'typescript-eslint';

export default [
{
ignores: ['*', '!src', '!vitest.config.ts']
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
parser: parser,
ecmaVersion: 5,
sourceType: 'module',

parserOptions: {
project: ['tsconfig.json']
}
},
rules: {
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/consistent-type-assertions': 'warn',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
indent: 'off',
'prefer-arrow-callback': 'warn',
'object-shorthand': ['warn', 'never'],
camelcase: 'warn',
'no-bitwise': 'off',
'no-console': 'warn',
'no-empty': 'warn',
'no-param-reassign': 'warn',
quotes: ['warn', 'single'],
semi: 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_'
}
]
}
}
];
Loading

0 comments on commit 4dfe888

Please sign in to comment.