-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
56 lines (53 loc) · 1.35 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/eslint-config/patch/modern-module-resolution');
var isDev = process.env.NODE_ENV === 'development';
/**
* @type {import("eslint").Linter.Config}
*/
const config = {
root: true,
extends: ['@rushstack/eslint-config/profile/node'], // <---- put your profile string here
env: {
es6: true,
},
ignorePatterns: [],
rules: {
// This rule reduces performance by 84%, so only enabled during CI.
'@typescript-eslint/no-floating-promises': isDev ? 'off' : 'error',
'@typescript-eslint/no-invalid-this': 'error',
'no-console': 'warn',
},
overrides: [
{
files: ['**/*.{ts,js}'],
/**
* TypeScript configuration
*/
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
},
},
{
files: ['src/packlets/scripts/*', '*.spec.ts'],
rules: {
'@rushstack/packlets/mechanics': 0,
},
},
{
files: ['**/schemas/*.ts', '**/env.ts'],
rules: {
'@typescript-eslint/typedef': 0,
},
},
{
files: ['src/commands/**'],
rules: {
'@typescript-eslint/typedef': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
},
},
],
};
module.exports = config;