Skip to content

Commit

Permalink
Adding missing copyright part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kramer committed Sep 8, 2023
1 parent a8b3104 commit 13d4cfe
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 26 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ yarn add @michaelkramer/eslint-plugin-facepalm --dev
"@michaelkramer/eslint-plugin-facepalm"
],
"rules": {
"@michaelkramer/facepalm/no-comment-console": "warn"
"@michaelkramer/facepalm/no-comment-console": "warn",
"@michaelkramer/facepalm/no-useless-comments": "warn"
"@michaelkramer/facepalm/missing-copyright": [ "warn", "copyright.txt" ]
}
}
```
Expand All @@ -56,5 +57,8 @@ Examples:
- `// do {`
- `// this.setStatus()`

#### missing-copyright

this reports if the file is missing a copyright at the top of a file.

[![coffee](https://cdn.buymeacoffee.com/buttons/v2/default-orange.png)](https://www.buymeacoffee.com/CVtZwWc)
9 changes: 3 additions & 6 deletions copyright.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
* This software is owned exclusively by Alert Innovation.
* This software is owned exclusively by NAME.
* As such, this software may not be copied, modified, or
* distributed without express permission from Alert.
* distributed without express permission from NAME.
*
* Copyright (c) 2022
* Alert Innovation
* 101 Billerica Avenue, Building 3
* North Billerica, MA 01862
* Copyright (c) 2023
* All Rights Reserved
9 changes: 3 additions & 6 deletions example/mycopyright.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
* This software is owned exclusively by Alert Innovation.
* This software is owned exclusively by NAME.
* As such, this software may not be copied, modified, or
* distributed without express permission from Alert.
* distributed without express permission from NAME.
*
* Copyright (c) 2022
* Alert Innovation
* 101 Billerica Avenue, Building 3
* North Billerica, MA 01862
* Copyright (c) 2023
* All Rights Reserved
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@michaelkramer/eslint-plugin-facepalm",
"version": "1.1.5",
"version": "1.1.6",
"main": "lib/index.js",
"license": "MIT",
"description": "All the dumb! code you left in before your push.",
Expand Down
18 changes: 6 additions & 12 deletions tests/missing-copyright.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ tester.run("missing-copyright", Rule, {
options: [ "./copyright.txt"],
code: `
/*
* This software is owned exclusively by Alert Innovation.
* This software is owned exclusively by NAME.
* As such, this software may not be copied, modified, or
* distributed without express permission from Alert.
* distributed without express permission from NAME.
*
* Copyright (c) 2022
* Alert Innovation
* 101 Billerica Avenue, Building 3
* North Billerica, MA 01862
* Copyright (c) 2023
* All Rights Reserved
*/
const a = 2;
Expand All @@ -29,14 +26,11 @@ tester.run("missing-copyright", Rule, {
`const a = 2;`,
output:
`/*
* This software is owned exclusively by Alert Innovation.
* This software is owned exclusively by NAME.
* As such, this software may not be copied, modified, or
* distributed without express permission from Alert.
* distributed without express permission from NAME.
*
* Copyright (c) 2022
* Alert Innovation
* 101 Billerica Avenue, Building 3
* North Billerica, MA 01862
* Copyright (c) 2023
* All Rights Reserved
*/
const a = 2;`,
Expand Down

0 comments on commit 13d4cfe

Please sign in to comment.