Skip to content

[WIP] Fixes dependency cycles and add eslint no-cycle rule #2624

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Meklo
Copy link
Contributor

@Meklo Meklo commented Feb 26, 2025

No description provided.

@Meklo Meklo changed the title Fixes dependency cycles and add eslint no-cycle rule [WIP] Fixes dependency cycles and add eslint no-cycle rule Feb 26, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has totally checked 788 files.

Valid Invalid Ignored Fixed
731 11 46 0
Click to see the invalid file list
  • src/components/custom-aggrid/custom-aggrid-filters/custom-aggrid-filter.type.ts
  • src/components/custom-aggrid/custom-aggrid.type.ts
  • src/components/dialogs/limits/limits.type.ts
  • src/components/dialogs/parameters/dynamicsimulation/dynamic-simulation.type.ts
  • src/components/dialogs/parameters/non-evacuated-energy/non-evacuated-energy.type.ts
  • src/components/dialogs/parameters/sensi/sensitivity-analysis.type.ts
  • src/components/dialogs/parameters/voltageinit/voltage-init.type.ts
  • src/components/graph/util/shared-functions.ts
  • src/components/result-view-tab.type.ts
  • src/components/results/common/filter.type.ts
  • src/components/results/securityanalysis/security-analysis-columns-definition.ts

@@ -0,0 +1,62 @@
import { ColDef, GridApi, IFilterOptionDef } from 'ag-grid-community';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ColDef, GridApi, IFilterOptionDef } from 'ag-grid-community';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import { ColDef, GridApi, IFilterOptionDef } from 'ag-grid-community';

@@ -0,0 +1,13 @@
import { TableSortKeysType } from '../../redux/reducer';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { TableSortKeysType } from '../../redux/reducer';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import { TableSortKeysType } from '../../redux/reducer';

@@ -0,0 +1,22 @@
import { TemporaryLimit } from '../../../services/network-modification-types';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { TemporaryLimit } from '../../../services/network-modification-types';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import { TemporaryLimit } from '../../../services/network-modification-types';

@@ -0,0 +1,34 @@
import yup from '../../../utils/yup-config';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import yup from '../../../utils/yup-config';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import yup from '../../../utils/yup-config';

@@ -0,0 +1,22 @@
import yup from '../../../utils/yup-config';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import yup from '../../../utils/yup-config';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import yup from '../../../utils/yup-config';

@@ -0,0 +1,4 @@
export enum EquipmentsSelectionType {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export enum EquipmentsSelectionType {
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
export enum EquipmentsSelectionType {

@@ -0,0 +1,57 @@
import { NetworkModificationNodeData, NodeType, RootNodeData } from '../tree-node.type';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { NetworkModificationNodeData, NodeType, RootNodeData } from '../tree-node.type';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import { NetworkModificationNodeData, NodeType, RootNodeData } from '../tree-node.type';

@@ -0,0 +1,8 @@
import ComputingType from './computing-status/computing-type';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import ComputingType from './computing-status/computing-type';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import ComputingType from './computing-status/computing-type';

@@ -0,0 +1,5 @@
export interface Filter {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export interface Filter {
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
export interface Filter {

@@ -0,0 +1,622 @@
import { IntlShape } from 'react-intl';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { IntlShape } from 'react-intl';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import { IntlShape } from 'react-intl';

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has totally checked 787 files.

Valid Invalid Ignored Fixed
731 10 46 0
Click to see the invalid file list
  • src/components/custom-aggrid/custom-aggrid-filters/custom-aggrid-filter.type.ts
  • src/components/custom-aggrid/custom-aggrid.type.ts
  • src/components/dialogs/limits/limits.type.ts
  • src/components/dialogs/parameters/dynamicsimulation/dynamic-simulation.type.ts
  • src/components/dialogs/parameters/sensi/shared-functions.ts
  • src/components/dialogs/parameters/voltageinit/voltage-init.type.ts
  • src/components/graph/util/shared-functions.ts
  • src/components/result-view-tab.type.ts
  • src/components/results/common/filter.type.ts
  • src/components/results/securityanalysis/security-analysis-columns-definition.ts

@@ -0,0 +1,425 @@
import {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import {
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import {

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has totally checked 793 files.

Valid Invalid Ignored Fixed
731 16 46 0
Click to see the invalid file list
  • src/components/custom-aggrid/custom-aggrid-filters/custom-aggrid-filter.type.ts
  • src/components/custom-aggrid/custom-aggrid.type.ts
  • src/components/diagrams/diagram.type.ts
  • src/components/diagrams/use-diagram.ts
  • src/components/dialogs/limits/limits.type.ts
  • src/components/dialogs/parameters/dynamicsimulation/dynamic-simulation.type.ts
  • src/components/dialogs/parameters/sensi/shared-functions.ts
  • src/components/dialogs/parameters/voltageinit/voltage-init.type.ts
  • src/components/graph/util/shared-functions.ts
  • src/components/result-view-tab.type.ts
  • src/components/results/common/filter.type.ts
  • src/components/results/securityanalysis/security-analysis-columns-definition.ts
  • src/redux/actions-fields.ts
  • src/redux/actions.type.ts
  • src/redux/app-state.type.ts
  • src/redux/reducer.type.ts

@@ -0,0 +1,19 @@
export enum ViewState {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export enum ViewState {
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
export enum ViewState {

@@ -0,0 +1,53 @@
import { useDispatch } from 'react-redux';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { useDispatch } from 'react-redux';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import { useDispatch } from 'react-redux';

@@ -0,0 +1,19 @@
export enum ViewState {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export enum ViewState {
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
export enum ViewState {

@@ -0,0 +1,53 @@
import { useDispatch } from 'react-redux';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { useDispatch } from 'react-redux';
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
import { useDispatch } from 'react-redux';

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
19.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant