Skip to content

Commit b1f10ff

Browse files
authored
chore: enforce license header (#434)
Signed-off-by: Jan Kowalleck <[email protected]> Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 8ed35d3 commit b1f10ff

46 files changed

Lines changed: 47 additions & 47 deletions

Some content is hidden

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

.eslintrc.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/*!
32
This file is part of CycloneDX JavaScript Library.
43
@@ -35,7 +34,9 @@ module.exports = {
3534
},
3635
plugins: [
3736
/* see https://github.com/lydell/eslint-plugin-simple-import-sort#readme */
38-
'simple-import-sort'
37+
'simple-import-sort',
38+
/* see https://github.com/Stuk/eslint-plugin-header#readme */
39+
'header'
3940
],
4041
env: {
4142
commonjs: true,
@@ -58,9 +59,12 @@ module.exports = {
5859
{
5960
files: ['*.js'],
6061
rules: {
62+
// region docs
63+
/* see https://github.com/gajus/eslint-plugin-jsdoc */
6164
'jsdoc/require-param-type': 'error',
6265
'jsdoc/require-property-type': 'error',
6366
'jsdoc/require-returns-type': 'error'
67+
// region docs
6468
},
6569
settings: {
6670
jsdoc: {
@@ -101,8 +105,12 @@ module.exports = {
101105
'jsdoc/require-throws': 'error',
102106
'jsdoc/require-yields': 0,
103107
'jsdoc/require-yields-check': 'error',
104-
'jsdoc/sort-tags': 'warn'
108+
'jsdoc/sort-tags': 'warn',
105109
// endregion docs
110+
// region license-header
111+
/* see https://github.com/Stuk/eslint-plugin-header#readme */
112+
'header/header': ['error', '.license-header.js']
113+
// endregion license-header
106114
},
107115
settings: {
108116
jsdoc: {

.license-header.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*!
2+
This file is part of CycloneDX JavaScript Library.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache-2.0
17+
Copyright (c) OWASP Foundation. All Rights Reserved.
18+
*/

.mocharc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/*!
32
This file is part of CycloneDX JavaScript Library.
43

libs/universal-node-xml/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/*!
32
This file is part of CycloneDX JavaScript Library.
43

libs/universal-node-xml/stringifiers/helpers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/*!
32
This file is part of CycloneDX JavaScript Library.
43

libs/universal-node-xml/stringifiers/xmlbuilder2.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/*!
32
This file is part of CycloneDX JavaScript Library.
43

libs/universal-node-xml/stringifiers/xmlbuilder2.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/*!
32
This file is part of CycloneDX JavaScript Library.
43

package-lock.json

Lines changed: 17 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
@@ -51,6 +51,7 @@
5151
"deepmerge": "^4.2.2",
5252
"eslint": "^8.23.0",
5353
"eslint-config-standard-with-typescript": "^31.0.0",
54+
"eslint-plugin-header": "^3.1.1",
5455
"eslint-plugin-jsdoc": "^39.6.2",
5556
"eslint-plugin-simple-import-sort": "^9.0.0",
5657
"mocha": "10.2.0",

tests/_data/models.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/*!
32
This file is part of CycloneDX JavaScript Library.
43

0 commit comments

Comments
 (0)