diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..a7b0904 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,34 @@ +import typescriptEslint from '@typescript-eslint/eslint-plugin'; +import tsParser from '@typescript-eslint/parser'; + +export default [ + { + ignores: ['node_modules/', 'build/', 'dist/', '*.js', '!eslint.config.mjs'], + }, + { + files: ['**/*.ts', '**/*.tsx'], + languageOptions: { + parser: tsParser, + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + }, + plugins: { + '@typescript-eslint': typescriptEslint, + }, + rules: { + ...typescriptEslint.configs.recommended.rules, + '@typescript-eslint/no-var-requires': 'off', + 'no-constant-condition': 'off', + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }, + ], + }, + }, +];