-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjavascript
More file actions
44 lines (43 loc) · 1.31 KB
/
javascript
File metadata and controls
44 lines (43 loc) · 1.31 KB
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
// This file should be empty since we're using eslint.config.js
import eslint from '@eslint/js';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import sonarjs from 'eslint-plugin-sonarjs';
import prettier from 'eslint-config-prettier';
export default [
eslint.configs.recommended,
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json'
},
plugins: {
'@typescript-eslint': tsPlugin,
sonarjs,
},
rules: {
...tsPlugin.configs.recommended.rules,
...sonarjs.configs.recommended.rules,
...prettier.rules,
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'sonarjs/no-duplicate-string': 'warn',
'sonarjs/cognitive-complexity': ['warn', 15]
},
ignores: [
'node_modules/',
'dist/',
'out/',
'coverage/',
'*.min.js',
'*.d.ts',
'.aider.chat.history.md'
]
}
];