-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy path.eslintrc.js
40 lines (36 loc) · 1.58 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
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/heft-node-rig/profiles/default/includes/eslint/patch/modern-module-resolution');
// This is a workaround for https://github.com/microsoft/rushstack/issues/3021
require('@rushstack/heft-node-rig/profiles/default/includes/eslint/patch/custom-config-package-names');
module.exports = {
extends: [
'@rushstack/heft-node-rig/profiles/default/includes/eslint/profile/node',
'@rushstack/heft-node-rig/profiles/default/includes/eslint/mixins/friendly-locals'
],
parserOptions: { tsconfigRootDir: __dirname },
plugins: ['eslint-plugin-header'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
// Rationale: Including the `type` annotation in the import statement for imports
// only used as types prevents the import from being emitted in the compiled output.
'@typescript-eslint/consistent-type-imports': [
'warn',
{ prefer: 'type-imports', disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' }
],
// Rationale: If all imports in an import statement are only used as types,
// then the import statement should be omitted in the compiled JS output.
'@typescript-eslint/no-import-type-side-effects': 'warn',
'header/header': [
'warn',
'line',
[
' Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.',
' See LICENSE in the project root for license information.'
]
]
}
}
]
};