-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
66 lines (54 loc) · 1.69 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
57
58
59
60
61
62
63
64
65
66
'use strict'
const os = require('os')
const lbstyle = os.platform() === 'win32' ? 'windows' : 'unix'
module.exports = {
reportUnusedDisableDirectives: true,
extends: [
'@strv/node/v14',
'@strv/node/optional',
'@strv/node/style',
],
ignorePatterns: [
'*.js',
'*.d.ts',
'!.*.js',
'!*.config.js',
'node_modules',
'docs',
],
rules: {
// If your editor cannot show these to you, occasionally turn this off and run the linter
'no-warning-comments': 0,
// This repository is configured so that upon checkout, git should convert line endings to
// platform-specific defaults and convert them back to LF when checking in. As such, we must
// enforce CRLF endings on Windows, otherwise the lint task would fail on Windows systems.
'linebreak-style': ['error', lbstyle],
},
overrides: [{
files: [
'**/*.ts',
'**/*.test.ts',
],
extends: [
'@strv/node/v14',
'@strv/node/optional',
'@strv/eslint-config-typescript',
'@strv/eslint-config-typescript/style',
'@strv/mocha',
],
parserOptions: {
project: 'tsconfig.json',
},
env: {
// Disable Mocha globals which are enabled in @strv/mocha. We will import the necessary
// functions directly from 'mocha' package in this project.
// This is done so that we avoid having all of the Mocha globals being declared even in source
// files. It is currently not possible to disable these globals for source files but have them
// available in test files - they are either fully available or not available at all.
mocha: false,
},
rules: {
'linebreak-style': ['error', lbstyle],
},
}],
}