diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 17767be..01e90e7 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,6 @@ { "recommendations": [ "arcanis.vscode-zipfs", - "dbaeumer.vscode-eslint", - "doi.fileheadercomment" + "dbaeumer.vscode-eslint" ] -} +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index f210ba7..35f8ee2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,42 +4,11 @@ "**/.pnp.*": true }, "eslint.nodePath": ".yarn/sdks", - "prettier.prettierPath": ".yarn/sdks/prettier/index.js", "editor.formatOnPaste": true, "editor.formatOnSave": true, "editor.formatOnType": true, "typescript.tsdk": ".yarn/sdks/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true, - "fileHeaderComment.parameter": { - "*": { - "author": "Daryl Ronningen", - "license_gpl-3.0-or-later": [ - "This file is part of ArgonBot", - "", - "ArgonBot is free software: you can redistribute it and/or modify", - "it under the terms of the GNU General Public License as published by", - "the Free Software Foundation, either version 3 of the License, or", - "(at your option) any later version.", - "", - "ArgonBot is distributed in the hope that it will be useful,", - "but WITHOUT ANY WARRANTY; without even the implied warranty of", - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the", - "GNU General Public License for more details.", - "", - "You should have received a copy of the GNU General Public License", - "along with ArgonBot. If not, see ." - ] - } - }, - "fileHeaderComment.template": { - "gpl": [ - "${commentbegin}", - "${commentprefix} Created on ${datetime24h}", - "${commentprefix}", - "${commentprefix} ${license_gpl-3.0-or-later}", - "${commentend}" - ] - }, "eslint.format.enable": true, "eslint.lintTask.enable": true, "eslint.packageManager": "yarn", diff --git a/license-header.txt b/license-header.txt new file mode 100644 index 0000000..7cc480e --- /dev/null +++ b/license-header.txt @@ -0,0 +1,16 @@ +/* + * This file is part of ArgonBot + * + * ArgonBot is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ArgonBot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ArgonBot. If not, see . + */ \ No newline at end of file diff --git a/package.json b/package.json index 5f1c8c8..2c25eb0 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ }, "devDependencies": { "@commitlint/cli": "^12.1.4", - "@commitlint/config-angular": "^12.1.4", "@commitlint/config-conventional": "^12.1.4", "@commitlint/prompt-cli": "^12.1.4", "@rollup/plugin-json": "^4.1.0", @@ -73,6 +72,7 @@ "@yarnpkg/pnpify": "^3.0.0-rc.6", "eslint": "^7.28.0", "eslint-formatter-pretty": "^4.1.0", + "eslint-plugin-header": "^3.1.1", "husky": "^6.0.0", "lint-staged": "^11.0.0", "mocha": "^9.0.0", @@ -103,7 +103,8 @@ "sourceType": "module" }, "plugins": [ - "@typescript-eslint" + "@typescript-eslint", + "header" ], "rules": { "indent": [ @@ -141,6 +142,10 @@ "error", "always-multiline" ], + "header/header": [ + 2, + "license-header.txt" + ], "no-case-declarations": "off", "@typescript-eslint/no-non-null-assertion": "off" }, diff --git a/yarn.lock b/yarn.lock index 663e47c..4c2587f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -291,22 +291,6 @@ __metadata: languageName: node linkType: hard -"@commitlint/config-angular-type-enum@npm:^12.1.4": - version: 12.1.4 - resolution: "@commitlint/config-angular-type-enum@npm:12.1.4" - checksum: c814cd2e455fa54b08f4bea867c4faea76a82d1ab6fac8cfbd8e345830dc46f7bd10364b4449d15f7cecc915da935c3e4fcf192b346dc2d155d91b34b5f70e09 - languageName: node - linkType: hard - -"@commitlint/config-angular@npm:^12.1.4": - version: 12.1.4 - resolution: "@commitlint/config-angular@npm:12.1.4" - dependencies: - "@commitlint/config-angular-type-enum": ^12.1.4 - checksum: 6f89247d2daea0eca3055b68dc46f845942c64433b6679608ea293b8f2883fc471aca0aa4c54c38875b48d1e87c413b082a1f6c575ec57e2570718e27953d00d - languageName: node - linkType: hard - "@commitlint/config-conventional@npm:^12.1.4": version: 12.1.4 resolution: "@commitlint/config-conventional@npm:12.1.4" @@ -1444,7 +1428,6 @@ __metadata: resolution: "argon-bot@workspace:." dependencies: "@commitlint/cli": ^12.1.4 - "@commitlint/config-angular": ^12.1.4 "@commitlint/config-conventional": ^12.1.4 "@commitlint/prompt-cli": ^12.1.4 "@discordjs/opus": ^0.5.3 @@ -1470,6 +1453,7 @@ __metadata: erlpack: ^0.1.3 eslint: ^7.28.0 eslint-formatter-pretty: ^4.1.0 + eslint-plugin-header: ^3.1.1 ffmpeg-static: ^4.3.0 figlet: ^1.5.0 gradient-string: ^1.2.0 @@ -2871,6 +2855,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-header@npm:^3.1.1": + version: 3.1.1 + resolution: "eslint-plugin-header@npm:3.1.1" + peerDependencies: + eslint: ">=7.7.0" + checksum: 2353e4ba011be81d5c27fbd79929e18dce118d7673a2f717b1ac5a0bceb33e06ec9a7c80a01dddc5804df75e2cc8eb475d268cd1abef5eab5088ede62e5ad246 + languageName: node + linkType: hard + "eslint-rule-docs@npm:^1.1.5": version: 1.1.227 resolution: "eslint-rule-docs@npm:1.1.227"