|
| 1 | +import { |
| 2 | + getRepositories, |
| 3 | + getPathIgnorePattern, |
| 4 | +} from 'eslint-remote-tester-repositories'; |
| 5 | +import typescriptParser from '@typescript-eslint/parser'; |
| 6 | +import vueParser from 'vue-eslint-parser'; |
| 7 | +import eslintPluginUnicorn from '../../index.js'; |
| 8 | + |
| 9 | +/** @type {import('eslint-remote-tester').Config} */ |
| 10 | +const config = { |
| 11 | + /** Repositories to scan */ |
| 12 | + repositories: getRepositories({randomize: true}), |
| 13 | + |
| 14 | + /** Optional pattern used to exclude paths */ |
| 15 | + pathIgnorePattern: getPathIgnorePattern(), |
| 16 | + |
| 17 | + /** Extensions of files under scanning */ |
| 18 | + extensions: ['js', 'cjs', 'mjs', 'ts', 'cts', 'mts', 'jsx', 'tsx', 'vue'], |
| 19 | + |
| 20 | + /** Maximum amount of tasks ran concurrently */ |
| 21 | + concurrentTasks: 3, |
| 22 | + |
| 23 | + /** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defaults to true. */ |
| 24 | + cache: false, |
| 25 | + |
| 26 | + /** Optional setting for log level. Valid values are verbose, info, warn, error. Defaults to verbose. */ |
| 27 | + logLevel: 'info', |
| 28 | + |
| 29 | + /** ESLint configuration */ |
| 30 | + eslintConfig: [ |
| 31 | + eslintPluginUnicorn.configs['flat/all'], |
| 32 | + { |
| 33 | + rules: { |
| 34 | + // This rule crashing on replace string inside `jsx` or `Unicode escape sequence` |
| 35 | + 'unicorn/string-content': 'off', |
| 36 | + }, |
| 37 | + }, |
| 38 | + { |
| 39 | + files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.tsx'], |
| 40 | + languageOptions: { |
| 41 | + parser: typescriptParser, |
| 42 | + parserOptions: { |
| 43 | + project: [], |
| 44 | + }, |
| 45 | + }, |
| 46 | + }, |
| 47 | + { |
| 48 | + files: ['**/*.vue'], |
| 49 | + languageOptions: { |
| 50 | + parser: vueParser, |
| 51 | + parserOptions: { |
| 52 | + parser: '@typescript-eslint/parser', |
| 53 | + ecmaFeatures: { |
| 54 | + jsx: true, |
| 55 | + }, |
| 56 | + project: [], |
| 57 | + }, |
| 58 | + }, |
| 59 | + }, |
| 60 | + ], |
| 61 | +}; |
| 62 | + |
| 63 | +export default config; |
0 commit comments