mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
feat(frontend): automate adding copyright header
This commit is contained in:
parent
08b1deae50
commit
45e3352577
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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user