mirror of
https://github.com/hexastack/hexabot
synced 2025-04-28 02:02:05 +00:00
Merge pull request #248 from Hexastack/247-issue-eslint-rule-to-automate-adding-copyright-header
247 issue eslint rule to automate adding copyright header
This commit is contained in:
commit
6e58361abf
@ -5,7 +5,7 @@ module.exports = {
|
|||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
},
|
},
|
||||||
plugins: ['@typescript-eslint/eslint-plugin', 'import'],
|
plugins: ['@typescript-eslint/eslint-plugin', 'import', 'license-header'],
|
||||||
extends: [
|
extends: [
|
||||||
'plugin:@typescript-eslint/recommended',
|
'plugin:@typescript-eslint/recommended',
|
||||||
'plugin:prettier/recommended',
|
'plugin:prettier/recommended',
|
||||||
@ -71,5 +71,19 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'license-header/header': [
|
||||||
|
'error',
|
||||||
|
[
|
||||||
|
'/*',
|
||||||
|
' * 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).',
|
||||||
|
' */',
|
||||||
|
],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
19
api/package-lock.json
generated
19
api/package-lock.json
generated
@ -87,6 +87,7 @@
|
|||||||
"eslint": "^8.42.0",
|
"eslint": "^8.42.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-import-resolver-typescript": "~3.6.1",
|
"eslint-import-resolver-typescript": "~3.6.1",
|
||||||
|
"eslint-plugin-license-header": "^0.6.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
@ -10065,6 +10066,15 @@
|
|||||||
"strip-bom": "^3.0.0"
|
"strip-bom": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-license-header": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-license-header/-/eslint-plugin-license-header-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-9aIz8q3OaMr1/uQmCGCWySjTs5nEXUJexNegz/8lluNcZbEl82Ag1Vyr1Hu3oIveRW1NbXDPs6nu4zu9mbrmWA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"requireindex": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-plugin-prettier": {
|
"node_modules/eslint-plugin-prettier": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz",
|
||||||
@ -16779,6 +16789,15 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/requireindex": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/resolve": {
|
"node_modules/resolve": {
|
||||||
"version": "1.22.8",
|
"version": "1.22.8",
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
||||||
|
@ -108,6 +108,7 @@
|
|||||||
"eslint": "^8.42.0",
|
"eslint": "^8.42.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-import-resolver-typescript": "~3.6.1",
|
"eslint-import-resolver-typescript": "~3.6.1",
|
||||||
|
"eslint-plugin-license-header": "^0.6.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
export interface SubscriberContext {
|
export interface SubscriberContext {
|
||||||
vars?: { [key: string]: any };
|
vars?: { [key: string]: any };
|
||||||
}
|
}
|
||||||
|
8
api/src/eventemitter.d.ts
vendored
8
api/src/eventemitter.d.ts
vendored
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import { type OnEventOptions } from '@nestjs/event-emitter/dist/interfaces';
|
import { type OnEventOptions } from '@nestjs/event-emitter/dist/interfaces';
|
||||||
import type { Listener, OnOptions } from 'eventemitter2';
|
import type { Listener, OnOptions } from 'eventemitter2';
|
||||||
import type {
|
import type {
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import { BaseBlockPlugin } from './base-block-plugin';
|
import { BaseBlockPlugin } from './base-block-plugin';
|
||||||
import { BaseEventPlugin } from './base-event-plugin';
|
import { BaseEventPlugin } from './base-event-plugin';
|
||||||
import { BasePlugin } from './base-plugin.service';
|
import { BasePlugin } from './base-plugin.service';
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
export const buildURL = (baseUrl: string, relativePath: string): string => {
|
export const buildURL = (baseUrl: string, relativePath: string): string => {
|
||||||
try {
|
try {
|
||||||
return new URL(relativePath).toString();
|
return new URL(relativePath).toString();
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* 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).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
75
frontend/.eslintrc.js
Normal file
75
frontend/.eslintrc.js
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
plugins: ["@typescript-eslint/eslint-plugin", "import", "license-header"],
|
||||||
|
extends: ["next/core-web-vitals"],
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
argsIgnorePattern: "^_",
|
||||||
|
varsIgnorePattern: "^_",
|
||||||
|
caughtErrorsIgnorePattern: "^_",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"import/newline-after-import": "error",
|
||||||
|
"import/order": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
groups: [
|
||||||
|
"builtin", // Built-in imports (come from NodeJS native) go first
|
||||||
|
"external", // <- External imports
|
||||||
|
"unknown", // <- unknown
|
||||||
|
"index", // <- index imports
|
||||||
|
"internal", // <- Absolute imports
|
||||||
|
"parent", // <- Relative imports, the sibling and parent types they can be mingled together
|
||||||
|
"sibling",
|
||||||
|
],
|
||||||
|
"newlines-between": "always",
|
||||||
|
alphabetize: {
|
||||||
|
/* sort in ascending order. Options: ["ignore", "asc", "desc"] */
|
||||||
|
order: "asc",
|
||||||
|
/* ignore case. Options: [true, false] */
|
||||||
|
caseInsensitive: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"newline-after-var": "error",
|
||||||
|
"newline-before-return": "error",
|
||||||
|
"no-console": "error",
|
||||||
|
"no-duplicate-imports": "error",
|
||||||
|
"object-shorthand": "error",
|
||||||
|
"padding-line-between-statements": [
|
||||||
|
"error",
|
||||||
|
{ blankLine: "never", prev: ["const"], next: "const" },
|
||||||
|
],
|
||||||
|
"react/jsx-curly-brace-presence": "warn",
|
||||||
|
"react/self-closing-comp": "error",
|
||||||
|
"license-header/header": [
|
||||||
|
"error",
|
||||||
|
[
|
||||||
|
"/*",
|
||||||
|
" * 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).',
|
||||||
|
" */",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: "detect",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": ["@typescript-eslint/eslint-plugin", "import"],
|
|
||||||
"extends": ["next/core-web-vitals"],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/no-unused-vars": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"argsIgnorePattern": "^_",
|
|
||||||
"varsIgnorePattern": "^_",
|
|
||||||
"caughtErrorsIgnorePattern": "^_"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"import/newline-after-import": "error",
|
|
||||||
"import/order": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"groups": [
|
|
||||||
"builtin", // Built-in imports (come from NodeJS native) go first
|
|
||||||
"external", // <- External imports
|
|
||||||
"unknown", // <- unknown
|
|
||||||
"index", // <- index imports
|
|
||||||
"internal", // <- Absolute imports
|
|
||||||
"parent", // <- Relative imports, the sibling and parent types they can be mingled together
|
|
||||||
"sibling"
|
|
||||||
],
|
|
||||||
"newlines-between": "always",
|
|
||||||
"alphabetize": {
|
|
||||||
/* sort in ascending order. Options: ["ignore", "asc", "desc"] */
|
|
||||||
"order": "asc",
|
|
||||||
/* ignore case. Options: [true, false] */
|
|
||||||
"caseInsensitive": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"newline-after-var": "error",
|
|
||||||
"newline-before-return": "error",
|
|
||||||
"no-console": "error",
|
|
||||||
"no-duplicate-imports": "error",
|
|
||||||
"object-shorthand": "error",
|
|
||||||
"padding-line-between-statements": [
|
|
||||||
"error",
|
|
||||||
{ "blankLine": "never", "prev": ["const"], "next": "const" }
|
|
||||||
],
|
|
||||||
"react/jsx-curly-brace-presence": "warn",
|
|
||||||
"react/self-closing-comp": "error"
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"react": {
|
|
||||||
"version": "detect"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -52,6 +52,7 @@
|
|||||||
"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",
|
||||||
"random-seed": "^0.3.0",
|
"random-seed": "^0.3.0",
|
||||||
"typescript": "^5.5.3"
|
"typescript": "^5.5.3"
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import { CircularProgress, Grid } from "@mui/material";
|
import { CircularProgress, Grid } from "@mui/material";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
|
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import { css, keyframes } from "@emotion/react";
|
import { css, keyframes } from "@emotion/react";
|
||||||
import styled from "@emotion/styled";
|
import styled from "@emotion/styled";
|
||||||
import {
|
import {
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DefaultLinkModel,
|
DefaultLinkModel,
|
||||||
DefaultLinkModelOptions,
|
DefaultLinkModelOptions,
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* 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).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
OptionsObject,
|
OptionsObject,
|
||||||
enqueueSnackbar,
|
enqueueSnackbar,
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import { TOptionsBase } from "i18next";
|
import { TOptionsBase } from "i18next";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import type { NextApiRequest, NextApiResponse } from "next";
|
import type { NextApiRequest, NextApiResponse } from "next";
|
||||||
|
|
||||||
type ResponseData = {
|
type ResponseData = {
|
||||||
|
19
package-lock.json
generated
19
package-lock.json
generated
@ -86,6 +86,7 @@
|
|||||||
"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",
|
||||||
"random-seed": "^0.3.0",
|
"random-seed": "^0.3.0",
|
||||||
"typescript": "^5.5.3"
|
"typescript": "^5.5.3"
|
||||||
},
|
},
|
||||||
@ -5303,6 +5304,15 @@
|
|||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-license-header": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-license-header/-/eslint-plugin-license-header-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-9aIz8q3OaMr1/uQmCGCWySjTs5nEXUJexNegz/8lluNcZbEl82Ag1Vyr1Hu3oIveRW1NbXDPs6nu4zu9mbrmWA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"requireindex": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-plugin-react": {
|
"node_modules/eslint-plugin-react": {
|
||||||
"version": "7.35.0",
|
"version": "7.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz",
|
||||||
@ -8457,6 +8467,15 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/requireindex": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/reselect": {
|
"node_modules/reselect": {
|
||||||
"version": "4.1.8",
|
"version": "4.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"plugins": ["@typescript-eslint/eslint-plugin", "import", "react"],
|
"plugins": [
|
||||||
|
"@typescript-eslint/eslint-plugin",
|
||||||
|
"import",
|
||||||
|
"react",
|
||||||
|
"license-header"
|
||||||
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
@ -46,7 +51,19 @@
|
|||||||
{ "blankLine": "never", "prev": ["const"], "next": "const" }
|
{ "blankLine": "never", "prev": ["const"], "next": "const" }
|
||||||
],
|
],
|
||||||
"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": [
|
||||||
|
"error",
|
||||||
|
[
|
||||||
|
"/*",
|
||||||
|
" * Copyright © 2024 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).",
|
||||||
|
" */"
|
||||||
|
]
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"react": {
|
"react": {
|
||||||
|
3
widget/src/vite-env.d.ts
vendored
3
widget/src/vite-env.d.ts
vendored
@ -5,3 +5,6 @@
|
|||||||
* 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).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//added to bypass ESLint issue happing when we add an copyright header in a empty file
|
||||||
|
type empty = never;
|
||||||
|
@ -1,32 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 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).
|
||||||
|
*/
|
||||||
|
|
||||||
import { resolve } from "path";
|
import { resolve } from "path";
|
||||||
|
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import dts from "vite-plugin-dts";
|
import dts from "vite-plugin-dts";
|
||||||
|
|
||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
return {
|
return {
|
||||||
plugins: [react(), dts()],
|
plugins: [react(), dts()],
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: "0.0.0.0",
|
||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
'process.env':
|
"process.env":
|
||||||
mode === 'development' ? { 'process.env': process.env } : {},
|
mode === "development" ? { "process.env": process.env } : {},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
lib: {
|
lib: {
|
||||||
entry: resolve(__dirname, 'src/ChatWidget.tsx'),
|
entry: resolve(__dirname, "src/ChatWidget.tsx"),
|
||||||
name: 'HexabotWidget',
|
name: "HexabotWidget",
|
||||||
fileName: (format) => `hexabot-widget.${format}.js`,
|
fileName: (format) => `hexabot-widget.${format}.js`,
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: ['react', 'react-dom'],
|
external: ["react", "react-dom"],
|
||||||
output: {
|
output: {
|
||||||
globals: {
|
globals: {
|
||||||
react: 'React',
|
react: "React",
|
||||||
'react-dom': 'ReactDOM',
|
"react-dom": "ReactDOM",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user