Fixing weitere Lint Warnungen
-
Warning in /BioMe/frontend/app/src/components/shared/sharedFilter/SharedTable.ts WARNING in /BioMe/frontend/app/src/components/shared/sharedFilter/SharedTable.ts(23,30): 23:30 Array type using 'Array' is forbidden for simple types. Use 'T[]' instead.
21 | @Prop({
22 | default: () => [SharedTableViewLevels.DATA],
> 23 | }) private viewOptions!: Array<SharedTableViewLevels>;
| ^
24 | private filterCriteriaType: FilterCriteriaType = FilterCriteriaType.INSPECTION;
25 | private headers: Array<any> = [];
26 | private items: Array<any> = [];
-
Warning in /BioMe/frontend/app/src/components/shared/sharedFilter/SharedTable.ts WARNING in /BioMe/frontend/app/src/components/shared/sharedFilter/SharedTable.ts(25,22): 25:22 Array type using 'Array' is forbidden for simple types. Use 'T[]' instead.
23 | }) private viewOptions!: Array<SharedTableViewLevels>;
24 | private filterCriteriaType: FilterCriteriaType = FilterCriteriaType.INSPECTION;
> 25 | private headers: Array<any> = [];
| ^
26 | private items: Array<any> = [];
27 | private isLoading = false;
28 | }
-
Warning in /BioMe/frontend/app/src/components/shared/sharedFilter/SharedTable.ts WARNING in /BioMe/frontend/app/src/components/shared/sharedFilter/SharedTable.ts(26,20): 26:20 Array type using 'Array' is forbidden for simple types. Use 'T[]' instead.
24 | private filterCriteriaType: FilterCriteriaType = FilterCriteriaType.INSPECTION;
25 | private headers: Array<any> = [];
> 26 | private items: Array<any> = [];
| ^
27 | private isLoading = false;
28 | }
29 |
-
Warning in /BioMe/frontend/app/src/components/TransectInspectionFooterData.ts WARNING in /BioMe/frontend/app/src/components/TransectInspectionFooterData.ts(42,21): 42:21 object access via string literals is disallowed
40 | return false;
41 | }
> 42 | return args["method"]();
| ^
43 | },
44 | params: ["method"],
45 | message: i18n.t("transektbegehung.footerData.invalidEndTime") as string,
-
Warning in /BioMe/frontend/app/src/components/TransectInspectionTable.ts WARNING in /BioMe/frontend/app/src/components/TransectInspectionTable.ts(60,25): 60:25 Array type using 'Array' is forbidden for simple types. Use 'T[]' instead.
58 | { text: i18n.t("transektbegehung.mainData.delete"), value: "delete", sortable: false, tooltip: i18n.t("transektbegehung.mainData.delete") },
59 | ];
> 60 | private tableItems: Array<ObservationTableRow> = [];
| ^
61 | private selectedSpecies = null;
62 | private editObservation = {};
63 | private addObservationTableRowToTable() {
-
Warning in /BioMe/frontend/app/src/store/index.ts WARNING in /BioMe/frontend/app/src/store/index.ts(40,21): 40:21 Shadowed name: 'roleToCheck'
38 | return state.userState; },
39 | hasExactRole: (state, roleToCheck: Role) => {
> 40 | return (roleToCheck: Role) => {
| ^
41 | return RoleService.getInstance().isUserRole(roleToCheck);
42 | };
43 | },
-
Warning in /BioMe/frontend/app/src/store/index.ts WARNING in /BioMe/frontend/app/src/store/index.ts(45,21): 45:21 Shadowed name: 'roleToCheck'
43 | },
44 | hasAtLeastRole: (state, roleToCheck: Role) => {
> 45 | return (roleToCheck: Role) => {
| ^
46 | return RoleService.getInstance().isUserRole(roleToCheck, true);
47 | };
48 | },
-
Warning in /BioMe/frontend/app/src/store/index.ts WARNING in /BioMe/frontend/app/src/store/index.ts(56,21): 56:21 Shadowed name: 'ptNameId'
54 | },
55 | getSpeciesByIdFromSpeciesList: (state, ptNameId) => {
> 56 | return (ptNameId: number) => {
| ^
57 | let obj = null;
58 | let species: any;
59 |
-
Warning in /BioMe/frontend/app/src/store/index.ts WARNING in /BioMe/frontend/app/src/store/index.ts(69,21): 69:21 Shadowed name: 'ptNameId'
67 | },
68 | getSpeciesByIdFromTreeList: (state, ptNameId) => {
> 69 | return (ptNameId: number) => {
| ^
70 | let obj = {};
71 | let superFamily: FamilyItem;
72 | let family: FamilyItem;
-
Warning in /BioMe/frontend/app/src/views/TransectInspection.ts WARNING in /BioMe/frontend/app/src/views/TransectInspection.ts(94,9): 94:9 Expected a 'for-of' loop instead of a 'for' loop with this simple iteration
92 | }
93 | const sections = data.data.transect.sections.edges;
> 94 | for (let i = 0; i < sections.length; i++) {
| ^
95 | const sectionNode = sections[i].node;
96 | const newSection: Section = {
97 | accessible: sectionNode.accessible,
-
Warning in /BioMe/frontend/app/src/views/NewsManagement.ts Missing braces after else
> 92 | } else return "";
| ^
-
Warning in /BioMe/frontend/app/src/views/NewsManagement.ts Missing whitespace after async
> 124 | private deleteCurrentItem = async(item: any) => {
| ^