-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.eslint.await.finder.js
More file actions
35 lines (33 loc) · 922 Bytes
/
.eslint.await.finder.js
File metadata and controls
35 lines (33 loc) · 922 Bytes
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
// this is <only> use to find missing `await` in front of calling `async` functions
// eslint-disable-next-line import/no-unresolved
import tseslint from 'typescript-eslint'
import { fileURLToPath } from 'url'
import { dirname } from 'path'
// eslint-disable-next-line no-underscore-dangle
const __dirname = dirname(fileURLToPath(import.meta.url))
export default tseslint.config({
languageOptions: {
globals: {
Promise: 'readonly',
// node globals
__dirname: false,
__filename: false,
process: false,
require: false,
module: false,
exports: false,
},
parser: tseslint.parser,
parserOptions: {
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./.eslint.await.finder.tsconfig.json'],
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
},
extends: [
...tseslint.configs.recommendedTypeChecked,
],
})