mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
feat(widget): automate adding copyright header
This commit is contained in:
parent
516737ac4b
commit
d3e0c2e287
@ -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