-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (49 loc) · 1.62 KB
/
eslint.config.mjs
File metadata and controls
50 lines (49 loc) · 1.62 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
45
46
47
48
49
50
import eslint from '@eslint/js';
import { defineConfig, globalIgnores } from 'eslint/config';
import importPlugin from 'eslint-plugin-import';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import sonarjs from 'eslint-plugin-sonarjs';
import tseslint from 'typescript-eslint';
export default defineConfig(
globalIgnores(['**/node_modules/**', 'dist/**', 'bin/**', 'src/models/**']),
eslint.configs.recommended,
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
prettierRecommended,
sonarjs.configs.recommended,
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['*.mjs'],
},
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
import: importPlugin,
},
rules: {
'class-methods-use-this': 'off',
'consistent-return': 'off',
'max-len': 'off',
'no-restricted-syntax': 'off',
'object-curly-newline': 'off',
'import/prefer-default-export': 'off',
'import/order': [
'error',
{
groups: [['builtin', 'external', 'internal']],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'angle-bracket' }],
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'sonarjs/no-duplicate-string': 'off',
},
}
);