Skip to content

Commit 45cb413

Browse files
chore: add legal text linter rule and apply to code base (#1341)
1 parent 2391dcf commit 45cb413

File tree

223 files changed

+830
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+830
-124
lines changed

.eslintrc.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = {
3030
NREUM: true,
3131
newrelic: true
3232
},
33-
plugins: ['sonarjs'],
33+
plugins: ['sonarjs', 'headers'],
3434
extends: ['standard', 'plugin:sonarjs/recommended'],
3535
overrides: [
3636
{
@@ -53,7 +53,18 @@ module.exports = {
5353
},
5454
rules: {
5555
'no-console': ['error'],
56-
'n/no-callback-literal': 'off' // This is not NodeJS code and should not be forced to adhere to NodeJS callback parameter pattern
56+
'n/no-callback-literal': 'off', // This is not NodeJS code and should not be forced to adhere to NodeJS callback parameter pattern
57+
'headers/header-format': [
58+
'error',
59+
{
60+
source: 'string',
61+
content: `Copyright {year} New Relic, Inc. All rights reserved.
62+
SPDX-License-Identifier: Apache-2.0`,
63+
variables: {
64+
year: '2020-' + new Date().getFullYear()
65+
}
66+
}
67+
]
5768
}
5869
},
5970
{

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@
238238
"dotenv-webpack": "^8.0.1",
239239
"eslint": "^8.56.0",
240240
"eslint-config-standard": "^17.1.0",
241+
"eslint-plugin-headers": "^1.2.1",
241242
"eslint-plugin-import": "^2.29.1",
242243
"eslint-plugin-n": "^16.6.2",
243244
"eslint-plugin-promise": "^6.1.1",

src/cdn/experimental.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/*
2-
* Copyright 2023 New Relic Corporation. All rights reserved.
1+
/**
2+
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
/**

src/cdn/lite.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
/**
27
* @file Creates a "Lite" agent loader bundle composed of the core Agent and a subset of available feature modules.
38
*/

src/cdn/pro.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
/**
27
* @file Creates a "Pro" agent loader bundle composed of the core Agent and all available feature modules except `spa`.
38
* This excludes collection of BrowserInteraction and BrowserTiming events.

src/cdn/spa.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
/**
27
* @file Creates a "SPA" agent loader bundle composed of the core agent and all available feature modules.
38
*/

src/common/aggregate/aggregator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/*
2-
* Copyright 2020 New Relic Corporation. All rights reserved.
1+
/**
2+
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
export class Aggregator {

src/common/aggregate/event-aggregator.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
15
import { Aggregator } from './aggregator'
26

37
/**
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
15
export const isValid = jest.fn()
26
export const getInfo = jest.fn()
37
export const setInfo = jest.fn()

0 commit comments

Comments
 (0)