mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(frontend): restrict dynamic header to the updates files
This commit is contained in:
parent
cde0e001a3
commit
9233a447aa
21
frontend/.eslintrc-staged.js
Normal file
21
frontend/.eslintrc-staged.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
module.exports = {
|
||||||
|
extends: './.eslintrc.js',
|
||||||
|
rules: {
|
||||||
|
'header/header': [
|
||||||
|
2,
|
||||||
|
'block',
|
||||||
|
[
|
||||||
|
'',
|
||||||
|
' * Copyright © ' +
|
||||||
|
new Date().getFullYear() +
|
||||||
|
' 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,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
plugins: ["@typescript-eslint/eslint-plugin", "import", "license-header"],
|
plugins: ["@typescript-eslint/eslint-plugin", "import", "header"],
|
||||||
extends: ["next/core-web-vitals"],
|
extends: ["next/core-web-vitals"],
|
||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": [
|
||||||
@ -52,19 +52,23 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
"react/jsx-curly-brace-presence": "warn",
|
"react/jsx-curly-brace-presence": "warn",
|
||||||
"react/self-closing-comp": "error",
|
"react/self-closing-comp": "error",
|
||||||
"license-header/header": [
|
"header/header": [
|
||||||
"error",
|
2,
|
||||||
|
"block",
|
||||||
[
|
[
|
||||||
"/*",
|
"",
|
||||||
" * Copyright © " +
|
{
|
||||||
new Date().getFullYear() +
|
pattern:
|
||||||
" Hexastack. All rights reserved.",
|
"^ \\* 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:",
|
" * 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.',
|
' * 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. 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: {
|
settings: {
|
||||||
|
|||||||
@ -13,6 +13,9 @@
|
|||||||
"lint:fix": "next lint --fix",
|
"lint:fix": "next lint --fix",
|
||||||
"typecheck": "tsc --noEmit --downlevelIteration"
|
"typecheck": "tsc --noEmit --downlevelIteration"
|
||||||
},
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{ts,tsx}": "eslint --fix -c \".eslintrc-staged.js\""
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chatscope/chat-ui-kit-react": "^2.0.3",
|
"@chatscope/chat-ui-kit-react": "^2.0.3",
|
||||||
"@chatscope/chat-ui-kit-styles": "^1.4.0",
|
"@chatscope/chat-ui-kit-styles": "^1.4.0",
|
||||||
@ -52,7 +55,8 @@
|
|||||||
"eslint": "^8.42.0",
|
"eslint": "^8.42.0",
|
||||||
"eslint-config-next": "14.2.3",
|
"eslint-config-next": "14.2.3",
|
||||||
"eslint-import-resolver-typescript": "~3.6.1",
|
"eslint-import-resolver-typescript": "~3.6.1",
|
||||||
"eslint-plugin-license-header": "^0.6.1",
|
"eslint-plugin-header": "^3.1.1",
|
||||||
|
"lint-staged": "^15.3.0",
|
||||||
"random-seed": "^0.3.0",
|
"random-seed": "^0.3.0",
|
||||||
"typescript": "^5.5.3"
|
"typescript": "^5.5.3"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user