Skip to content
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

Eslint issue 44 fix #55

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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 .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
},
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-explicit-any": "off"
}
}
2 changes: 1 addition & 1 deletion bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function bundle() {
name: 'nightwatch-bundle',
apply: 'serve',
transformIndexHtml: {
transform(html, _ctx) {
transform(html) {
const reportData = readFileSync(sampleReportPath, { encoding: 'utf8' });
return html + `<script>window.nightwatchReport = ${reportData}</script>`;
}
Expand Down
2 changes: 1 addition & 1 deletion nightwatch/utils/TestGlobalContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GlobalContext } from '../../src/contexts/GlobalContext';

type GlobalContextProps = {
children: ReactNode;
value: any;
value: unknown;
};

export const GlobalContextProvider: React.FC<GlobalContextProps> = ({ children, value }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/EnvironmentDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const EnvironmentDropdown: React.FC = () => {
setEnvData(data);
}
});
}, [environmentName]);
}, [envDropdownData,environmentName]);

return (
<DropdownMenu.Root onOpenChange={(open) => setDropdownOpen(open)}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Separator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styled, { css } from 'styled-components';
import styled from 'styled-components';

type SeparatorProps = {
borderColor?: string;
Expand Down
6 changes: 3 additions & 3 deletions src/components/TestDetailsView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const TestDetailsView: React.FC<TestDetailsViewProps> = ({ testStepsData, traceP
const { snapshotFilePath, snapshotUrl } = traceObject;
setTrace({ url: snapshotUrl, snapshotPath: snapshotFilePath });
}
}, [filterTestSteps]);
}, [filteredTestsSteps]);

return (
<Wrapper>
Expand All @@ -50,7 +50,7 @@ const TestDetailsView: React.FC<TestDetailsViewProps> = ({ testStepsData, traceP
active={index === activeTestStep && !!test.domSnapshot}
setActiveTestStep={setActiveTestStep}
setTrace={setTrace}>
{`${test.name}${validTestArgs(test.args) ? `('${joinArgs(test.args!)}')` : ''}`}
{`${test.name}${validTestArgs(test.args) ? `('${joinArgs(test.args)}')` : ''}`}
</PassTestStep>
);
}
Expand All @@ -70,7 +70,7 @@ const TestDetailsView: React.FC<TestDetailsViewProps> = ({ testStepsData, traceP
setActiveTestStep={setActiveTestStep}
setTrace={setTrace}
tracePresent={tracePresent}>
{`${test.name}${validTestArgs(test.args) ? `('${joinArgs(test.args!)}')` : ''}`}
{`${test.name}${validTestArgs(test.args) ? `('${joinArgs(test.args)}')` : ''}`}
</ErrorTestStep>
);
}
Expand Down