Skip to content

Commit 63bde01

Browse files
committed
Add linter to pre-commit hooks
1 parent 20eb3bb commit 63bde01

File tree

15 files changed

+19
-8
lines changed

15 files changed

+19
-8
lines changed

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@
6363
"vite-plugin-webfont-dl": "^3.11.1"
6464
},
6565
"lint-staged": {
66-
"**/*": "prettier --write --ignore-unknown"
66+
"public/*": "prettier --write --list-different",
67+
"src/**/*": [
68+
"prettier --write --list-different",
69+
"eslint --fix"
70+
]
6771
},
6872
"browserslist": {
6973
"production": [
70-
">0.2%",
74+
">0.5%",
7175
"chrome 81",
7276
"firefox 88",
7377
"not dead"

src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const locales = [
4747
{ locale: "ru", name: "Русский" },
4848
];
4949

50-
/* eslint-disable @typescript-eslint/no-unused-vars */
5150
const i18nProvider = polyglotI18nProvider(
5251
(locale) => messages[locale as keyof typeof messages],
5352
"en",

src/components/lineage/LineageFilters.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const LineageFilters = ({
8686
);
8787

8888
const submit = form.handleSubmit(
89+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8990
(formValues: LineageFilterValues & { [key: string]: any }) => {
9091
const keys = Object.keys(formValues);
9192
const validKeys = lineageFilterKeys.filter((key) =>

src/components/lineage/LineageView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const LineageView = (props: LineageViewProps) => {
4545
filter: values,
4646
})
4747
.then((data: LineageResponseV1) => {
48-
let initialNodes = getGraphNodes(data);
49-
let initialEdges = getGraphEdges(data);
48+
const initialNodes = getGraphNodes(data);
49+
const initialEdges = getGraphEdges(data);
5050

5151
initialNodes
5252
.filter((node) => node.id == currentNodeId)

src/components/lineage/nodes/dataset_container_node/DatasetNode.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export type DatasetNode = Node<DatasetResponseV1, "datasetNode">;
1212
export type DatasetNodeProps = NodeProps<DatasetNode>;
1313

1414
const DatasetNode = ({
15+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1516
containerNodeId,
1617
...props
1718
}: { containerNodeId: string } & DatasetNodeProps): ReactElement => {

src/components/lineage/nodes/operation_node/OperationNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NodeProps, Node, Handle, Position, useReactFlow } from "@xyflow/react";
2-
import { useCreatePath, useTranslate } from "react-admin";
2+
import { useCreatePath } from "react-admin";
33
import { memo, MouseEvent, ReactElement, useContext } from "react";
44
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
55

src/components/lineage/selection/LineageSelectionContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const LineageSelectionValue = {
66
nodeWithHandles: new Map<string, Set<string>>(),
77
edges: new Set<string>(),
88
},
9+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
910
setSelection: (newValue: LineageSelection): void => {},
1011
resetSelection: (): void => {},
1112
};

src/components/login/keycloak/keycloak_login.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useState } from "react";
21
import { useLocation } from "react-router-dom";
32
import {
43
Box,

src/components/operation/OperationRaListFilters.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const OperationRaListFilters = () => {
1818
const form = useForm({ defaultValues: filterValues });
1919

2020
const submit = form.handleSubmit(
21+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2122
(formValues: OperationRaListFilterValues & { [key: string]: any }) => {
2223
const keys = Object.keys(formValues);
2324
const validKeys = filterKeys.filter((key) => keys.includes(key));

src/components/operation/SqlText.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
stackoverflowLight,
55
hybrid,
66
} from "react-syntax-highlighter/dist/esm/styles/hljs";
7+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
78
// @ts-ignore
89
import sqlMore from "react-syntax-highlighter/dist/esm/languages/hljs/sql_more";
910

0 commit comments

Comments
 (0)