Skip to content

Commit

Permalink
chore: enforce license header (CycloneDX#588)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>

Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck authored Jan 25, 2023
1 parent 54d6102 commit ec7290e
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ module.exports = {
project: './tsconfig.json'
},
plugins: [
'simple-import-sort'
/* see https://github.com/lydell/eslint-plugin-simple-import-sort#readme */
'simple-import-sort',
/* see https://github.com/Stuk/eslint-plugin-header#readme */
'header'
],
env: {
commonjs: true,
Expand All @@ -55,7 +58,10 @@ module.exports = {
'sort-imports': 0,
/** @see https://github.com/lydell/eslint-plugin-simple-import-sort/ */
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error'
'simple-import-sort/exports': 'error',
// endregion sort imports/exports
/* see https://github.com/Stuk/eslint-plugin-header#readme */
'header/header': ['error', '.license-header.js']
// endregion license-header
}
}
18 changes: 18 additions & 0 deletions .license-header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*!
This file is part of CycloneDX Webpack plugin.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright (c) OWASP Foundation. All Rights Reserved.
*/
2 changes: 0 additions & 2 deletions examples/simple/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict'

/*!
This file is part of CycloneDX Webpack plugin.
Expand Down
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@types/webpack": "^5",
"eslint": "^8.23.0",
"eslint-config-standard-with-typescript": "^24.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"jest": "^28.1.3",
"jest-junit": "^15.0.0",
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
'use strict'
/* eslint-env jest */

/*!
This file is part of CycloneDX Webpack plugin.
Expand Down
1 change: 0 additions & 1 deletion tests/integration/setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use strict'
/*!
This file is part of CycloneDX Webpack plugin.
Expand Down

0 comments on commit ec7290e

Please sign in to comment.