Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion opencti-platform/opencti-front/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export default defineConfig([
},
settings: {
react: {
version: 'detect',
// temporary workaround for https://github.com/jsx-eslint/eslint-plugin-react/issues/3977
version: '19.2',
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions opencti-platform/opencti-front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"yup": "1.7.1"
},
"devDependencies": {
"@eslint/js": "9.39.3",
"@eslint/js": "10.0.1",
"@faker-js/faker": "10.3.0",
"@playwright/test": "1.58.2",
"@stylistic/eslint-plugin": "5.9.0",
Expand Down Expand Up @@ -156,7 +156,7 @@
"chokidar": "5.0.0",
"compression": "1.8.1",
"esbuild": "0.27.3",
"eslint": "9.39.3",
"eslint": "10.0.1",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-custom-rules": "workspace:*",
"eslint-plugin-import": "2.32.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ItemPriority: FunctionComponent<ItemPriorityProps> = ({
return <>-</>;
}

let priorityColor = theme.palette.severity.info;
let priorityColor: string;
switch (priority) {
case 'P4':
priorityColor = theme.palette.severity.low;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ItemSeverity: FunctionComponent<ItemSeverityProps> = ({
return <>-</>;
}

let severityColor = theme.palette.severity.default;
let severityColor: string;
switch (severity?.toLowerCase()) {
case 'low':
severityColor = theme.palette.severity.low;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ const EntityDetailsComponent: FunctionComponent<
const externalReferenceId = externalReference.node.external_id
? `(${externalReference.node.external_id})`
: '';
let externalReferenceSecondary = '';
let externalReferenceSecondary: string;
if (
externalReference.node.url
&& externalReference.node.url.length > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ExternalReferences = lazy(() => import('./ExternalReferences'));
const RootExternalReference = lazy(() => import('./external_references/Root'));

const Root = () => {
let redirect = null;
let redirect;
if (!useIsHiddenEntity('Report')) {
redirect = 'reports';
} else if (!useIsHiddenEntity('Grouping')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const StixCoreObjectExternalReferencesLinesContainer: FunctionComponent<
const externalReferenceId = externalReference.external_id
? `(${externalReference.external_id})`
: '';
let externalReferenceSecondary = '';
let externalReferenceSecondary: string;
if (externalReference.url && externalReference.url.length > 0) {
externalReferenceSecondary = externalReference.url;
} else if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class StixCoreRelationshipExternalReferencesLinesContainer extends Component {
const externalReferenceId = externalReference.external_id
? `(${externalReference.external_id})`
: '';
let externalReferenceSecondary = '';
let externalReferenceSecondary;
if (
externalReference.url
&& externalReference.url.length > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class StixSightingRelationshipExternalReferencesLinesContainer extends Component
const externalReferenceId = externalReference.external_id
? `(${externalReference.external_id})`
: '';
let externalReferenceSecondary = '';
let externalReferenceSecondary;
if (
externalReference.url
&& externalReference.url.length > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ const WorkbenchFileContentComponent = ({
...R.indexBy(R.prop('id'), stixCoreRelationships),
...R.indexBy(R.prop('id'), stixSightings),
};
let containerElementsIds = [];
let containerElementsIds;
if (containerSelectAll) {
containerElementsIds = R.uniq(
R.values(indexedStixObjects)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const TasksList = ({ data, options }) => {
<Stack spacing={2}>
{tasks.map((taskEdge) => {
const task = taskEdge.node;
let status = '';
let status;
if (task.completed) {
status = 'complete';
} else if (task.task_processed_number > 0) {
Expand Down Expand Up @@ -252,7 +252,7 @@ const TasksList = ({ data, options }) => {
? ` (Provisioning: ${task.task_processed_number}/${task.task_expected_number})`
: '';
const progressFullText = `${t_i18n('Progress')}${progressNumberDisplay}${provisioningNumberDisplay}`;
let progressValue = 0;
let progressValue;
if (task.work) {
if (task.work.status === 'complete') {
progressValue = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const StixSightingRelationships = lazy(() => import('./StixSightingRelationships
const StixSightingRelationship = lazy(() => import('./stix_sighting_relationships/StixSightingRelationship'));

const Root = () => {
let redirect = null;
let redirect;
if (!useIsHiddenEntity('Incident')) {
redirect = 'incidents';
} else if (!useIsHiddenEntity('stix-sighting-relationship')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const TokenCreationForm: FunctionComponent<TokenCreationFormProps> = ({
});

const onSubmit = (values: typeof initialValues, { setSubmitting }: FormikHelpers<typeof initialValues>) => {
let durationInput = 'UNLIMITED';
let durationInput;
switch (values.duration) {
case '30':
durationInput = 'DAYS_30';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const UserTokenCreationForm: FunctionComponent<UserTokenCreationFormProps> = ({
});

const onSubmit = (values: typeof initialValues, { setSubmitting }: FormikHelpers<typeof initialValues>) => {
let durationInput = 'UNLIMITED';
let durationInput: string;
switch (values.duration) {
case '30':
durationInput = 'DAYS_30';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const useLocalStorage = <T extends LocalStorage = LocalStorage>(
return initialState;
}
return value;
} catch (_error) {
} catch {
// If error also return initialValue
throw Error('Error while initializing values in local storage');
}
Expand Down Expand Up @@ -234,7 +234,7 @@ const useLocalStorage = <T extends LocalStorage = LocalStorage>(
setStoredValueToHistory(initialValue, valueToStore);
}
}
} catch (_error) {
} catch {
// A more advanced implementation would handle the error case
throw Error('Error while setting values in local storage');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const useBuildListOutcome = () => {
filters: dataSelection.filters,
};

let nodes: ListItem[] = [];
let nodes: ListItem[];
if (widgetPerspective === 'entities') {
const types = ['Stix-Core-Object'];
const data = await fetchQuery(stixCoreObjectsListQuery, { ...variables, types }).toPromise() as StixCoreObjectsListQuery$data;
Expand Down
Loading