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