| // @ts-check |
| import eslint from '@eslint/js'; |
| import tseslint from '@typescript-eslint/eslint-plugin'; |
| import tsparser from '@typescript-eslint/parser'; |
| import globals from 'globals'; |
| |
| export default [ |
| eslint.configs.recommended, |
| { |
| files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'], |
| languageOptions: { |
| parser: tsparser, |
| parserOptions: { |
| ecmaVersion: 2020, |
| sourceType: 'module', |
| }, |
| globals: { |
| ...globals.node, |
| ...globals.es2020, |
| }, |
| }, |
| plugins: { |
| '@typescript-eslint': tseslint, |
| }, |
| rules: { |
| ...tseslint.configs.recommended.rules, |
| '@typescript-eslint/no-explicit-any': 'warn', |
| '@typescript-eslint/explicit-function-return-type': 'off', |
| '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], |
| }, |
| }, |
| { |
| files: ['tests/**/*.ts', 'tests/**/*.tsx'], |
| languageOptions: { |
| globals: { |
| ...globals.node, |
| ...globals.jest, |
| }, |
| }, |
| }, |
| { |
| files: ['**/*.js', '**/*.mjs', '**/*.cjs'], |
| languageOptions: { |
| globals: { |
| ...globals.node, |
| ...globals.es2020, |
| }, |
| }, |
| }, |
| { |
| ignores: ['dist/', 'node_modules/', 'coverage/', 'src/thrift/generated/', '.jest-cache/'], |
| }, |
| ]; |