|
| 1 | +/* eslint-disable @typescript-eslint/no-var-requires */ |
1 | 2 | const path = require('path'); |
2 | 3 |
|
3 | 4 | module.exports = { |
4 | 5 | parser: '@typescript-eslint/parser', |
5 | 6 | plugins: ['@typescript-eslint', 'prettier'], |
6 | | - extends: [ |
7 | | - 'plugin:@typescript-eslint/recommended', |
8 | | - 'plugin:prettier/recommended', |
9 | | - ], |
| 7 | + extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], |
10 | 8 | parserOptions: { |
11 | 9 | sourceType: 'module', |
12 | 10 | useJSXTextNode: true, |
13 | | - project: [ |
14 | | - path.resolve(__dirname, 'tsconfig.test.json'), |
15 | | - path.resolve(__dirname, 'packages/mongodb-memory-server-core/tsconfig.json'), |
16 | | - ], |
| 11 | + project: [path.resolve(__dirname, 'tsconfig.test.json')], |
17 | 12 | }, |
18 | 13 | rules: { |
19 | 14 | 'no-underscore-dangle': 0, |
@@ -42,37 +37,55 @@ module.exports = { |
42 | 37 | '@typescript-eslint/explicit-function-return-type': 0, |
43 | 38 | '@typescript-eslint/no-use-before-define': 0, |
44 | 39 | '@typescript-eslint/no-empty-function': 0, |
45 | | - 'curly': ['error', 'all'], |
| 40 | + curly: ['error', 'all'], |
46 | 41 | 'padding-line-between-statements': [ |
47 | | - "warn", |
| 42 | + 'warn', |
48 | 43 | { |
49 | | - blankLine: 'always', prev: '*', next: 'return' // add blank line *before* all returns (if there are statements before) |
| 44 | + blankLine: 'always', |
| 45 | + prev: '*', |
| 46 | + next: 'return', // add blank line *before* all returns (if there are statements before) |
50 | 47 | }, |
51 | 48 | { |
52 | | - blankLine: 'always', prev: '*', next: 'if' // add blank line *before* all ifs |
| 49 | + blankLine: 'always', |
| 50 | + prev: '*', |
| 51 | + next: 'if', // add blank line *before* all ifs |
53 | 52 | }, |
54 | 53 | { |
55 | | - blankLine: 'always', prev: 'if', next: '*' // add blank line *after* all ifs |
| 54 | + blankLine: 'always', |
| 55 | + prev: 'if', |
| 56 | + next: '*', // add blank line *after* all ifs |
56 | 57 | }, |
57 | 58 | { |
58 | | - blankLine: 'any', prev: 'if', next: 'if' // allow blank line between ifs, but not enforce either |
| 59 | + blankLine: 'any', |
| 60 | + prev: 'if', |
| 61 | + next: 'if', // allow blank line between ifs, but not enforce either |
59 | 62 | }, |
60 | 63 | { |
61 | | - blankLine: 'always', prev: '*', next: ['function', 'class'] // add blank line *before* all functions and classes |
| 64 | + blankLine: 'always', |
| 65 | + prev: '*', |
| 66 | + next: ['function', 'class'], // add blank line *before* all functions and classes |
62 | 67 | }, |
63 | 68 | { |
64 | | - blankLine: 'always', prev: ['function', 'class'], next: '*' // add blank line *after* all functions and classes |
| 69 | + blankLine: 'always', |
| 70 | + prev: ['function', 'class'], |
| 71 | + next: '*', // add blank line *after* all functions and classes |
65 | 72 | }, |
66 | 73 | { |
67 | | - blankLine: 'always', prev: '*', next: 'import' // add blank line *before* all imports |
| 74 | + blankLine: 'always', |
| 75 | + prev: '*', |
| 76 | + next: 'import', // add blank line *before* all imports |
68 | 77 | }, |
69 | 78 | { |
70 | | - blankLine: 'always', prev: 'import', next: '*' // add blank line *after* all imports |
| 79 | + blankLine: 'always', |
| 80 | + prev: 'import', |
| 81 | + next: '*', // add blank line *after* all imports |
71 | 82 | }, |
72 | 83 | { |
73 | | - blankLine: 'never', prev: 'import', next: 'import' // dont allow blank line between imports |
| 84 | + blankLine: 'never', |
| 85 | + prev: 'import', |
| 86 | + next: 'import', // dont allow blank line between imports |
74 | 87 | }, |
75 | | - ] |
| 88 | + ], |
76 | 89 | }, |
77 | 90 | env: { |
78 | 91 | node: true, |
|
0 commit comments