-
-
Notifications
You must be signed in to change notification settings - Fork 366
/
.eslintrc.js
40 lines (39 loc) · 1.19 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
'use strict';
module.exports = {
extends: [
// https://github.com/prettier/eslint-config-prettier
'prettier',
],
parserOptions: {
ecmaVersion: 2019,
},
root: true,
ignorePatterns: ['src/**', 'tests/**', 'website/**', 'vendor/**'],
plugins: ['import', '@typescript-eslint'],
overrides: [
// Rules specific for TypeScript
{
files: ['**/*.ts'],
// We must use a different parser that supports TypeScript
parser: '@typescript-eslint/parser',
// Extra rules specific to TypeScript
extends: [
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
],
parserOptions: {
project: 'tsconfig.json',
},
rules: {
// Because I got bit by "forgetting await" too many times
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
},
},
],
rules: {
// This pattern is used by the CDK
'no-new': ['off'],
},
};