Spaces:
Paused
Paused
| import js from '@eslint/js'; | |
| import tseslint from 'typescript-eslint'; | |
| export default [ | |
| { | |
| ignores: [ | |
| 'node_modules/**', | |
| 'dist/**', | |
| 'packages/**', | |
| '**/*.test.ts', | |
| '**/*.spec.ts', | |
| 'tests/**', | |
| 'scripts/**', | |
| 'src/scripts/**', | |
| 'n.ts', | |
| 'test-*', | |
| 'test_*', | |
| '*.config.js', | |
| '*.config.cjs', | |
| ], | |
| }, | |
| js.configs.recommended, | |
| ...tseslint.configs.recommended, | |
| { | |
| files: ['src/**/*.ts'], | |
| languageOptions: { | |
| parserOptions: { | |
| ecmaVersion: 2022, | |
| sourceType: 'module', | |
| }, | |
| globals: { | |
| console: 'readonly', | |
| process: 'readonly', | |
| Buffer: 'readonly', | |
| __dirname: 'readonly', | |
| __filename: 'readonly', | |
| global: 'readonly', | |
| setTimeout: 'readonly', | |
| setInterval: 'readonly', | |
| clearTimeout: 'readonly', | |
| clearInterval: 'readonly', | |
| setImmediate: 'readonly', | |
| URL: 'readonly', | |
| URLSearchParams: 'readonly', | |
| fetch: 'readonly', | |
| AbortController: 'readonly', | |
| AbortSignal: 'readonly', | |
| FormData: 'readonly', | |
| Blob: 'readonly', | |
| TextEncoder: 'readonly', | |
| TextDecoder: 'readonly', | |
| crypto: 'readonly', | |
| performance: 'readonly', | |
| Response: 'readonly', | |
| Request: 'readonly', | |
| Headers: 'readonly', | |
| }, | |
| }, | |
| rules: { | |
| '@typescript-eslint/no-explicit-any': 'warn', | |
| '@typescript-eslint/no-unused-vars': [ | |
| 'warn', | |
| { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, | |
| ], | |
| '@typescript-eslint/no-require-imports': 'warn', | |
| '@typescript-eslint/ban-ts-comment': 'warn', | |
| '@typescript-eslint/prefer-as-const': 'warn', | |
| 'no-case-declarations': 'warn', | |
| 'no-empty': 'warn', | |
| 'prefer-const': 'warn', | |
| 'no-useless-escape': 'warn', | |
| 'no-irregular-whitespace': 'warn', | |
| }, | |
| }, | |
| ]; | |