chore(eslint): made eslint check for file headers
This commit is contained in:
parent
fffab62640
commit
c028cdd38a
5 changed files with 35 additions and 53 deletions
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"arcanis.vscode-zipfs",
|
"arcanis.vscode-zipfs",
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint"
|
||||||
"doi.fileheadercomment"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
31
.vscode/settings.json
vendored
31
.vscode/settings.json
vendored
|
@ -4,42 +4,11 @@
|
||||||
"**/.pnp.*": true
|
"**/.pnp.*": true
|
||||||
},
|
},
|
||||||
"eslint.nodePath": ".yarn/sdks",
|
"eslint.nodePath": ".yarn/sdks",
|
||||||
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
|
|
||||||
"editor.formatOnPaste": true,
|
"editor.formatOnPaste": true,
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.formatOnType": true,
|
"editor.formatOnType": true,
|
||||||
"typescript.tsdk": ".yarn/sdks/typescript/lib",
|
"typescript.tsdk": ".yarn/sdks/typescript/lib",
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
"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 <https: //www.gnu.org/licenses/>."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fileHeaderComment.template": {
|
|
||||||
"gpl": [
|
|
||||||
"${commentbegin}",
|
|
||||||
"${commentprefix} Created on ${datetime24h}",
|
|
||||||
"${commentprefix}",
|
|
||||||
"${commentprefix} ${license_gpl-3.0-or-later}",
|
|
||||||
"${commentend}"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"eslint.format.enable": true,
|
"eslint.format.enable": true,
|
||||||
"eslint.lintTask.enable": true,
|
"eslint.lintTask.enable": true,
|
||||||
"eslint.packageManager": "yarn",
|
"eslint.packageManager": "yarn",
|
||||||
|
|
16
license-header.txt
Normal file
16
license-header.txt
Normal file
|
@ -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 <https: //www.gnu.org/licenses/>.
|
||||||
|
*/
|
|
@ -54,7 +54,6 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^12.1.4",
|
"@commitlint/cli": "^12.1.4",
|
||||||
"@commitlint/config-angular": "^12.1.4",
|
|
||||||
"@commitlint/config-conventional": "^12.1.4",
|
"@commitlint/config-conventional": "^12.1.4",
|
||||||
"@commitlint/prompt-cli": "^12.1.4",
|
"@commitlint/prompt-cli": "^12.1.4",
|
||||||
"@rollup/plugin-json": "^4.1.0",
|
"@rollup/plugin-json": "^4.1.0",
|
||||||
|
@ -73,6 +72,7 @@
|
||||||
"@yarnpkg/pnpify": "^3.0.0-rc.6",
|
"@yarnpkg/pnpify": "^3.0.0-rc.6",
|
||||||
"eslint": "^7.28.0",
|
"eslint": "^7.28.0",
|
||||||
"eslint-formatter-pretty": "^4.1.0",
|
"eslint-formatter-pretty": "^4.1.0",
|
||||||
|
"eslint-plugin-header": "^3.1.1",
|
||||||
"husky": "^6.0.0",
|
"husky": "^6.0.0",
|
||||||
"lint-staged": "^11.0.0",
|
"lint-staged": "^11.0.0",
|
||||||
"mocha": "^9.0.0",
|
"mocha": "^9.0.0",
|
||||||
|
@ -103,7 +103,8 @@
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@typescript-eslint"
|
"@typescript-eslint",
|
||||||
|
"header"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"indent": [
|
"indent": [
|
||||||
|
@ -141,6 +142,10 @@
|
||||||
"error",
|
"error",
|
||||||
"always-multiline"
|
"always-multiline"
|
||||||
],
|
],
|
||||||
|
"header/header": [
|
||||||
|
2,
|
||||||
|
"license-header.txt"
|
||||||
|
],
|
||||||
"no-case-declarations": "off",
|
"no-case-declarations": "off",
|
||||||
"@typescript-eslint/no-non-null-assertion": "off"
|
"@typescript-eslint/no-non-null-assertion": "off"
|
||||||
},
|
},
|
||||||
|
|
27
yarn.lock
27
yarn.lock
|
@ -291,22 +291,6 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"@commitlint/config-conventional@npm:^12.1.4":
|
||||||
version: 12.1.4
|
version: 12.1.4
|
||||||
resolution: "@commitlint/config-conventional@npm:12.1.4"
|
resolution: "@commitlint/config-conventional@npm:12.1.4"
|
||||||
|
@ -1444,7 +1428,6 @@ __metadata:
|
||||||
resolution: "argon-bot@workspace:."
|
resolution: "argon-bot@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@commitlint/cli": ^12.1.4
|
"@commitlint/cli": ^12.1.4
|
||||||
"@commitlint/config-angular": ^12.1.4
|
|
||||||
"@commitlint/config-conventional": ^12.1.4
|
"@commitlint/config-conventional": ^12.1.4
|
||||||
"@commitlint/prompt-cli": ^12.1.4
|
"@commitlint/prompt-cli": ^12.1.4
|
||||||
"@discordjs/opus": ^0.5.3
|
"@discordjs/opus": ^0.5.3
|
||||||
|
@ -1470,6 +1453,7 @@ __metadata:
|
||||||
erlpack: ^0.1.3
|
erlpack: ^0.1.3
|
||||||
eslint: ^7.28.0
|
eslint: ^7.28.0
|
||||||
eslint-formatter-pretty: ^4.1.0
|
eslint-formatter-pretty: ^4.1.0
|
||||||
|
eslint-plugin-header: ^3.1.1
|
||||||
ffmpeg-static: ^4.3.0
|
ffmpeg-static: ^4.3.0
|
||||||
figlet: ^1.5.0
|
figlet: ^1.5.0
|
||||||
gradient-string: ^1.2.0
|
gradient-string: ^1.2.0
|
||||||
|
@ -2871,6 +2855,15 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"eslint-rule-docs@npm:^1.1.5":
|
||||||
version: 1.1.227
|
version: 1.1.227
|
||||||
resolution: "eslint-rule-docs@npm:1.1.227"
|
resolution: "eslint-rule-docs@npm:1.1.227"
|
||||||
|
|
Reference in a new issue