|
| 1 | +import js from '@eslint/js'; |
| 2 | +import tsParser from '@typescript-eslint/parser'; |
| 3 | +import tsPlugin from '@typescript-eslint/eslint-plugin'; |
| 4 | +import playwright from 'eslint-plugin-playwright'; |
| 5 | +import unicorn from 'eslint-plugin-unicorn'; |
| 6 | +import sonarjs from 'eslint-plugin-sonarjs'; |
| 7 | +import noJquery from 'eslint-plugin-no-jquery'; |
| 8 | + |
| 9 | +export default [ |
| 10 | + // Base JavaScript configuration |
| 11 | + js.configs.recommended, |
| 12 | + |
| 13 | + // Configuration for all TypeScript files |
| 14 | + { |
| 15 | + files: ['**/*.ts', '**/*.tsx'], |
| 16 | + languageOptions: { |
| 17 | + parser: tsParser, |
| 18 | + parserOptions: { |
| 19 | + project: './tsconfig.json', |
| 20 | + }, |
| 21 | + }, |
| 22 | + plugins: { |
| 23 | + '@typescript-eslint': tsPlugin, |
| 24 | + unicorn, |
| 25 | + playwright, |
| 26 | + sonarjs, |
| 27 | + 'no-jquery': noJquery, |
| 28 | + }, |
| 29 | + rules: { |
| 30 | + // Include TypeScript ESLint recommended rules |
| 31 | + ...tsPlugin.configs.recommended.rules, |
| 32 | + ...tsPlugin.configs['recommended-requiring-type-checking'].rules, |
| 33 | + |
| 34 | + // Include Unicorn plugin recommended rules |
| 35 | + ...unicorn.configs.recommended.rules, |
| 36 | + |
| 37 | + // Include Playwright plugin recommended rules |
| 38 | + ...playwright.configs.recommended.rules, |
| 39 | + |
| 40 | + // Include SonarJS plugin recommended rules |
| 41 | + ...sonarjs.configs.recommended.rules, |
| 42 | + |
| 43 | + // Include no-jquery plugin rules to ban all uses of jQuery |
| 44 | + ...noJquery.configs.all.rules, |
| 45 | + }, |
| 46 | + }, |
| 47 | +]; |
0 commit comments