Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(license): reformat license header inside front-end #2148

Merged
merged 4 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 3 additions & 13 deletions scripts/license_checker_and_adder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,9 @@
# This file is part of the Antares project.
"""

FRONTEND_LICENSE_HEADER = """/** Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of the Antares project.
*/
"""

front_license_path = Path(__file__).resolve().parent.parent / "webapp" / "license-header.js"
FRONTEND_LICENSE_HEADER = front_license_path.read_text()


def is_license_file(filename: str) -> bool:
Expand Down
13 changes: 13 additions & 0 deletions webapp/license-header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of the Antares project.
*/
3 changes: 2 additions & 1 deletion webapp/src/common/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Api.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Data/DataListing.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Data/DataPropsView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down Expand Up @@ -38,7 +39,7 @@
);
};

const onChange = async (currentName: string) => {

Check warning on line 42 in webapp/src/components/App/Data/DataPropsView.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Async arrow function has no 'await' expression
if (currentName !== "") {
const f = filter(currentName);
setFilteredDatas(f);
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Data/DatasetCreationDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Data/MatrixDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Data/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down Expand Up @@ -71,7 +72,7 @@
setOpenModal(true);
};

const handleDelete = async (id: string) => {

Check warning on line 75 in webapp/src/components/App/Data/index.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Async arrow function has no 'await' expression
setIdForDeletion(id);
setOpenConfirmationModal(true);
};
Expand Down Expand Up @@ -110,7 +111,7 @@
}
};

const onMatrixClick = async (id: string) => {

Check warning on line 114 in webapp/src/components/App/Data/index.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Async arrow function has no 'await' expression
if (selectedItem) {
const tmp = dataList.find((o) => o.id === selectedItem);
if (tmp) {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Data/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Data/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/Groups/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/Groups/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/Maintenance/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/Tokens/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/Tokens/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/Users/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/Users/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Settings/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down Expand Up @@ -40,10 +41,10 @@
}
};

const handleChange = async (e: React.ChangeEvent<HTMLInputElement>) => {

Check warning on line 44 in webapp/src/components/App/Singlestudy/Commands/Edition/DraggableCommands/CommandImportButton.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Async arrow function has no 'await' expression
e.preventDefault();
const reader = new FileReader();
reader.onload = async (ev: ProgressEvent<FileReader>) => {

Check warning on line 47 in webapp/src/components/App/Singlestudy/Commands/Edition/DraggableCommands/CommandImportButton.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Async arrow function has no 'await' expression
try {
if (ev.target) {
const text = ev.target.result;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down Expand Up @@ -131,7 +132,7 @@
}
};

const onDelete = async (index: number) => {

Check warning on line 135 in webapp/src/components/App/Singlestudy/Commands/Edition/index.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Async arrow function has no 'await' expression
setOpenDeleteCommandDialog(index);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Singlestudy/Commands/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/App/Singlestudy/Commands/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down Expand Up @@ -46,7 +47,7 @@
import DigestDialog from "../../../../../common/dialogs/DigestDialog";
import type { EmptyObject } from "../../../../../../utils/tsUtils";

export const ColorStatus = {

Check warning on line 50 in webapp/src/components/App/Singlestudy/HomeView/InformationView/LauncherHistory/JobStepper.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
running: "warning.main",
pending: "grey.400",
success: "success.main",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Copyright (c) 2024, RTE (https://www.rte-france.com)
/**
* Copyright (c) 2024, RTE (https://www.rte-france.com)
*
* See AUTHORS.txt
*
Expand Down
Loading
Loading