diff --git a/README.md b/README.md index 08df7dd..1f2652c 100644 --- a/README.md +++ b/README.md @@ -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" ] } } ``` @@ -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) diff --git a/copyright.txt b/copyright.txt index 8d97894..34c9301 100644 --- a/copyright.txt +++ b/copyright.txt @@ -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 \ No newline at end of file diff --git a/example/mycopyright.txt b/example/mycopyright.txt index 8d97894..34c9301 100644 --- a/example/mycopyright.txt +++ b/example/mycopyright.txt @@ -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 \ No newline at end of file diff --git a/package.json b/package.json index 3f24091..08e6357 100644 --- a/package.json +++ b/package.json @@ -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.", diff --git a/tests/missing-copyright.test.js b/tests/missing-copyright.test.js index da73fef..5510ebc 100644 --- a/tests/missing-copyright.test.js +++ b/tests/missing-copyright.test.js @@ -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; @@ -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;`,