-
Notifications
You must be signed in to change notification settings - Fork 0
/
projen.js
74 lines (66 loc) · 1.8 KB
/
projen.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const {
generalDisabledRules,
prettierConflictRules,
typescriptRules,
typescriptDeclarationOverride,
} = require('./lib/overrides')
module.exports = {
env: {
node: true,
},
extends: [
'canonical',
'canonical/node',
'canonical/jsdoc',
'canonical/regexp',
'canonical/typescript',
'canonical/typescript-type-checking',
'prettier',
],
overrides: [typescriptDeclarationOverride],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint'],
rules: {
...prettierConflictRules,
...generalDisabledRules,
...typescriptRules,
/**
* JSII only supports types via the `interface` keyword.
*/
'@typescript-eslint/consistent-type-definitions': 0,
/**
* Inline type imports cause issues with the JSII compiler.
*/
'@typescript-eslint/consistent-type-imports': [
'error',
{
disallowTypeAnnotations: true,
fixStyle: 'separate-type-imports',
prefer: 'type-imports',
},
],
// prevents unexpected behaivour changes
'@typescript-eslint/no-confusing-void-expression': 0,
// allow kebap case
'canonical/filename-match-regex': 0,
/**
* Disable autofix that uses unsupported inline type imports.
*/
'canonical/prefer-inline-type-import': 0,
/**
* Dependencies like `aws-sdk` are available in the Lambda runtime.
* In projen projects, we use `devDependencies` to indicate that a
* dependency is only used in development (e.g. tests).
*
* Upon compilation, projen will complain anyway if a depencies are
* not declared correctly.
*/
'import/no-extraneous-dependencies': 0,
// allows constructing without assignment
'no-new': 0,
},
}