-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy path.eslintrc.js
More file actions
36 lines (36 loc) · 1.4 KB
/
.eslintrc.js
File metadata and controls
36 lines (36 loc) · 1.4 KB
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
module.exports = {
root: true,
plugins: ['header'],
rules: {
'header/header': [
2,
'block',
[
'',
{
pattern: '^ \\* Copyright \\(c\\) \\d{4}, (salesforce.com, inc|Salesforce, Inc)\\.$',
template: ` * Copyright (c) ${new Date().getFullYear()}, Salesforce, Inc.`
},
' * All rights reserved.',
' * SPDX-License-Identifier: BSD-3-Clause',
' * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause',
' '
]
],
// Sometimes VS Code will automatically add missing imports, but will do so via
// @salesforce/retail-react-app/node_modules/ instead of a normal import. It technically
// works inside the monorepo, but won't necessarily work in customer projects, so we want to
// avoid the pattern. (Also just because it's weird.)
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['@salesforce/retail-react-app/node_modules/*'],
message: 'Did your IDE auto-complete this import? Avoid /node_modules/ and import the package directly.'
}
]
}
]
}
}