fix(widget): restrict dynamic header to the updates files

This commit is contained in:
yassinedorbozgithub 2025-01-02 11:44:55 +01:00
parent 9233a447aa
commit bc883c9135
3 changed files with 36 additions and 7 deletions

View File

@ -0,0 +1,19 @@
{
"extends": "./.eslintrc.json",
"rules": {
"header/header": [
2,
"block",
[
"",
" * Copyright © 2025 Hexastack. All rights reserved.",
" *",
" * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:",
" * 1. The name \"Hexabot\" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.",
" * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's \"About\" section, documentation, and README file).",
" "
],
2
]
}
}

View File

@ -1,6 +1,6 @@
{
"root": true,
"plugins": ["@typescript-eslint", "import", "license-header", "react"],
"plugins": ["@typescript-eslint", "import", "header", "react"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
@ -49,17 +49,22 @@
],
"react/jsx-curly-brace-presence": ["warn"],
"react/self-closing-comp": ["error"],
"license-header/header": [
"error",
"header/header": [
2,
"block",
[
"/*",
" * Copyright © 2024 Hexastack. All rights reserved.",
"",
{
"pattern": "^ \\* Copyright © 20\\d{2} Hexastack. All rights reserved.$",
"template": " * Copyright © 2025 Hexastack. All rights reserved."
},
" *",
" * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:",
" * 1. The name \"Hexabot\" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.",
" * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's \"About\" section, documentation, and README file).",
" */"
]
" "
],
2
]
},
"settings": {

View File

@ -16,6 +16,9 @@
"serve": "npx http-server ./dist/",
"typecheck": "tsc --noEmit"
},
"lint-staged": {
"*.{ts,tsx}": "eslint --fix -c \".eslintrc-staged.json\""
},
"dependencies": {
"@types/emoji-js": "^3.5.2",
"autolinker": "^4.0.0",
@ -33,9 +36,11 @@
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"lint-staged": "^15.3.0",
"sass": "^1.77.8",
"typescript": "^5.2.2",
"vite": "^5.3.4",