2022-11-03 09:23:15 +00:00
|
|
|
import { AppState } from "@appsmith/reducers";
|
|
|
|
|
import { get } from "lodash";
|
|
|
|
|
import { LintErrors } from "reducers/lintingReducers/lintErrorsReducers";
|
2022-11-18 10:23:24 +00:00
|
|
|
import { LintError } from "utils/DynamicBindingUtils";
|
2022-11-03 09:23:15 +00:00
|
|
|
|
|
|
|
|
export const getAllLintErrors = (state: AppState): LintErrors =>
|
|
|
|
|
state.linting.errors;
|
|
|
|
|
|
2022-11-18 10:23:24 +00:00
|
|
|
const emptyLint: LintError[] = [];
|
|
|
|
|
|
|
|
|
|
export const getEntityLintErrors = (state: AppState, path?: string) => {
|
|
|
|
|
if (!path) return emptyLint;
|
|
|
|
|
return get(state.linting.errors, path, emptyLint);
|
2022-11-03 09:23:15 +00:00
|
|
|
};
|