-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
41 lines (39 loc) · 1.14 KB
/
.eslintrc.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
const fs = require('node:fs');
const path = require('node:path');
const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8')
);
module.exports = {
extends: [
'prettier',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
root: true,
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir : __dirname,
include: ['src/**/*'],
sourceType: 'module',
},
env: {
es6: true,
node: true,
},
overrides: [
{
files: ['**/*.ts'],
rules: { 'prettier/prettier': ['warn', prettierOptions] },
},
],
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'prettier/prettier': ['error', prettierOptions],
'no-console': ['error', { 'allow': ['warn', 'error', 'info'] }],
},
ignorePatterns: ['swagger', '.eslintrc.js'],
};