-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
54 lines (53 loc) · 1.25 KB
/
eslint.config.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
42
43
44
45
46
47
48
49
50
51
52
53
54
const typescriptParser = require('@typescript-eslint/parser');
const typescriptPlugin = require('@typescript-eslint/eslint-plugin');
const prettierPlugin = require('eslint-plugin-prettier');
const globals = require('globals');
module.exports = [
{
ignores: [
'dist/**',
'node_modules/**',
'.serverless',
'.github',
'.gitignore',
'.idea',
'.nvmrc',
'.env',
'.prettierignore',
'.out',
],
},
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
globals: { ...globals.node, ...globals.es2021 },
sourceType: 'module',
parser: typescriptParser,
parserOptions: {
project: './tsconfig.jest.json',
},
},
plugins: {
'@typescript-eslint': typescriptPlugin,
prettier: prettierPlugin,
},
rules: {
'@typescript-eslint/no-floating-promises': 'error',
...typescriptPlugin.configs.recommended.rules,
...prettierPlugin.configs.recommended.rules,
},
},
{
files: ['**/*.js'],
languageOptions: {
globals: { ...globals.node, ...globals.es2021 },
sourceType: 'module',
},
plugins: {
prettier: prettierPlugin,
},
rules: {
...prettierPlugin.configs.recommended.rules,
},
},
];