38 lines
969 B
JavaScript
38 lines
969 B
JavaScript
|
import globals from 'globals'
|
||
|
import pluginJs from '@eslint/js'
|
||
|
import tseslint from 'typescript-eslint'
|
||
|
import prettierPlugin from 'eslint-plugin-prettier/recommended'
|
||
|
import prettierConfig from 'eslint-config-prettier'
|
||
|
|
||
|
/** @type {import('eslint').Linter.Config[]} */
|
||
|
export default [
|
||
|
{ files: ['**/*.{js,mjs,cjs,ts}'] },
|
||
|
{ languageOptions: { globals: globals.node } },
|
||
|
pluginJs.configs.recommended,
|
||
|
...tseslint.configs.recommended,
|
||
|
prettierConfig,
|
||
|
prettierPlugin,
|
||
|
{
|
||
|
rules: {
|
||
|
'@typescript-eslint/no-unused-vars': [
|
||
|
'error',
|
||
|
{
|
||
|
args: 'all',
|
||
|
argsIgnorePattern: '^_',
|
||
|
caughtErrors: 'all',
|
||
|
caughtErrorsIgnorePattern: '^_',
|
||
|
destructuredArrayIgnorePattern: '^_',
|
||
|
varsIgnorePattern: '^_',
|
||
|
ignoreRestSiblings: true
|
||
|
}
|
||
|
],
|
||
|
'@typescript-eslint/no-explicit-any': [
|
||
|
'error',
|
||
|
{
|
||
|
fixToUnknown: true
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
]
|