Skip to content

Commit a4225b6

Browse files
committed
chore: lint autofix
1 parent 928072c commit a4225b6

4 files changed

Lines changed: 17 additions & 14 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"build": "pnpm -r build",
77
"lint": "eslint '**/*.ts' --ignore-pattern '**/*.d.ts'",
8-
"lint:fix": "pnpm lint --fix",
8+
"fix": "pnpm lint --fix",
99
"lint:ci": "pnpm lint --max-warnings 0",
1010
"format": "pnpm -r format",
1111
"format:ci": "pnpm -r format:ci",

packages/cypress-plugin-visual-regression-diff/MIGRATION.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ No code change is required inside your tests. You only need to update **how you
1212

1313
### What changed
1414

15-
| Location | Before (all Cypress versions) | After (Cypress ≥ 15.10) |
16-
|---|---|---|
17-
| CLI flag | `--env "key=value"` | `--expose "key=value"` |
18-
| `cypress.config.ts` | `env: { key: value }` | `expose: { key: value }` |
19-
| `cypress.env.json` | `{ "key": "value" }` | use `expose` in `cypress.config.ts` instead |
15+
| Location | Before (all Cypress versions) | After (Cypress ≥ 15.10) |
16+
| ------------------- | ----------------------------- | ------------------------------------------- |
17+
| CLI flag | `--env "key=value"` | `--expose "key=value"` |
18+
| `cypress.config.ts` | `env: { key: value }` | `expose: { key: value }` |
19+
| `cypress.env.json` | `{ "key": "value" }` | use `expose` in `cypress.config.ts` instead |
2020

2121
### Plugin option names
2222

2323
All option names stay the same — they are prefixed with `pluginVisualRegression`:
2424

25-
| Option | Config key |
26-
|---|---|
27-
| `updateImages` | `pluginVisualRegressionUpdateImages` |
28-
| `cleanupUnusedImages` | `pluginVisualRegressionCleanupUnusedImages` |
29-
| `diffConfig` | `pluginVisualRegressionDiffConfig` |
25+
| Option | Config key |
26+
| ------------------------ | ---------------------------------------------- |
27+
| `updateImages` | `pluginVisualRegressionUpdateImages` |
28+
| `cleanupUnusedImages` | `pluginVisualRegressionCleanupUnusedImages` |
29+
| `diffConfig` | `pluginVisualRegressionDiffConfig` |
3030
| `forceDeviceScaleFactor` | `pluginVisualRegressionForceDeviceScaleFactor` |
31-
| `maxDiffThreshold` | `pluginVisualRegressionMaxDiffThreshold` |
31+
| `maxDiffThreshold` | `pluginVisualRegressionMaxDiffThreshold` |
3232

3333
### CLI
3434

packages/cypress-plugin-visual-regression-diff/src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const getPluginEnv = <K extends keyof Cypress.MatchImageOptions>(key: K) => {
6464
if (supportsExpose(Cypress.version)) {
6565
return Cypress.expose(envKey) as Cypress.MatchImageOptions[K] | undefined;
6666
}
67-
// eslint-disable-next-line @typescript-eslint/no-deprecated
67+
6868
return Cypress.env(envKey) as Cypress.MatchImageOptions[K] | undefined;
6969
};
7070

packages/cypress-plugin-visual-regression-diff/src/plugins.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export const initPlugin = (
2525
config: Cypress.PluginConfigOptions,
2626
) => {
2727
/* c8 ignore start */
28-
if (getPluginConfig(config, 'pluginVisualRegressionForceDeviceScaleFactor') !== false) {
28+
if (
29+
getPluginConfig(config, 'pluginVisualRegressionForceDeviceScaleFactor') !==
30+
false
31+
) {
2932
initForceDeviceScaleFactor(on);
3033
}
3134
/* c8 ignore stop */

0 commit comments

Comments
 (0)