Skip to content

Commit 31adc41

Browse files
author
Logan Graham
committed
fix lint target / lint all files
1 parent 3542073 commit 31adc41

File tree

4 files changed

+34
-33
lines changed

4 files changed

+34
-33
lines changed

visual-js/visual-nightwatch/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
extends: ['plugin:prettier/recommended'],
33
root: true,
44
parserOptions: {
5-
ecmaVersion: 'latesct',
5+
ecmaVersion: 'latest',
66
sourceType: 'module',
77
},
88
parser: '@typescript-eslint/parser',

visual-js/visual-nightwatch/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"tsup": "^8.0.2"
3838
},
3939
"scripts": {
40-
"lint": "eslint \"src/{nightwatch,utils}/**/*.ts\"",
40+
"lint": "eslint \"src/**/*.ts\"",
4141
"build": "tsc --noEmit && tsup src",
4242
"test-ignored": "jest --collect-coverage"
4343
},

visual-js/visual-nightwatch/src/index.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ console.log(
1111
export { DiffStatus, CheckOptions, Ignorable, DiffingMethod };
1212

1313
declare module 'nightwatch' {
14-
interface NightwatchAssertions<ReturnType> {
15-
sauceVisualResults: (
16-
diffStatus: DiffStatus,
17-
expected: number,
18-
) => ReturnType;
19-
}
14+
interface NightwatchAssertions<ReturnType> {
15+
sauceVisualResults: (
16+
diffStatus: DiffStatus,
17+
expected: number,
18+
) => ReturnType;
19+
}
2020

21-
interface NightwatchCustomCommands {
22-
sauceVisualCheck(
23-
name: string,
24-
options?: CheckOptions,
25-
): Awaitable<this, void>;
26-
}
21+
interface NightwatchCustomCommands {
22+
sauceVisualCheck(
23+
name: string,
24+
options?: CheckOptions,
25+
): Awaitable<this, void>;
26+
}
2727
}

visual-js/visual-nightwatch/src/types.ts

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,31 @@ declare global {
1212

1313
export type Ignorable = string | RegionIn;
1414

15-
export type SauceVisualAPI = ReturnType<typeof getApi>
15+
export type SauceVisualAPI = ReturnType<typeof getApi>;
1616

1717
export interface CheckOptions {
18-
ignore?: Array<Ignorable>;
19-
diffingMethod?: DiffingMethod;
20-
fullPage?: FullPageScreenshotOptions;
21-
/**
22-
* Whether we should take a snapshot of the DOM to compare with as a part of the diffing process.
23-
*/
24-
captureDom?: boolean;
25-
/**
26-
* A querySelector compatible selector of an element that we should crop the screenshot to.
27-
*/
28-
clipSelector?: string;
18+
ignore?: Array<Ignorable>;
19+
diffingMethod?: DiffingMethod;
20+
fullPage?: FullPageScreenshotOptions;
21+
/**
22+
* Whether we should take a snapshot of the DOM to compare with as a part of the diffing process.
23+
*/
24+
captureDom?: boolean;
25+
/**
26+
* A querySelector compatible selector of an element that we should crop the screenshot to.
27+
*/
28+
clipSelector?: string;
2929
}
3030

31-
export interface SauceVisualServiceOptions extends Pick<CheckOptions, 'fullPage' | 'captureDom' | 'clipSelector'>{
32-
buildName?: string;
33-
project?: string;
34-
branch?: string;
35-
defaultBranch?: string;
36-
failOnFailures?: boolean;
31+
export interface SauceVisualServiceOptions
32+
extends Pick<CheckOptions, 'fullPage' | 'captureDom' | 'clipSelector'> {
33+
buildName?: string;
34+
project?: string;
35+
branch?: string;
36+
defaultBranch?: string;
37+
failOnFailures?: boolean;
3738
}
3839

3940
export type RunnerSettings = NightwatchTestSettingGeneric & {
40-
sauceVisualService: SauceVisualServiceOptions;
41+
sauceVisualService: SauceVisualServiceOptions;
4142
};

0 commit comments

Comments
 (0)