Skip to content

Commit 7aef7c2

Browse files
committed
chore: lint fix
Signed-off-by: Jakub Freisler <[email protected]>
1 parent c2ac405 commit 7aef7c2

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
parser: "@typescript-eslint/parser",
1919
parserOptions: {
2020
sourceType: "module",
21-
project: ["./packages/cypress-plugin-visual-regression-diff/tsconfig.json", "./examples/webpack/tsconfig.json"],
21+
project: ["./packages/cypress-plugin-visual-regression-diff/tsconfig.json", "./examples/next/tsconfig.json", "./examples/webpack/tsconfig.json"],
2222
tsconfigRootDir: __dirname,
2323
warnOnUnsupportedTypeScriptVersion: false,
2424
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,

examples/next/cypress/e2e/app.cy.ts

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/* eslint-disable */
2-
// Disable ESLint to prevent failing linting inside the Next.js repo.
3-
// If you're using ESLint on your project, we recommend installing the ESLint Cypress plugin instead:
4-
// https://github.com/cypress-io/eslint-plugin-cypress
5-
61
describe("Navigation", () => {
72
it("should navigate to the about page", () => {
83
cy.visit("http://localhost:3000/");

examples/next/cypress/support/component.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-namespace */
21
// ***********************************************************
32
// This example support/component.ts is processed and
43
// loaded automatically before your test files.
@@ -15,26 +14,27 @@
1514
// ***********************************************************
1615

1716
// Import commands.js using ES2015 syntax:
18-
import './commands'
17+
import "./commands";
1918

2019
// Alternatively you can use CommonJS syntax:
2120
// require('./commands')
2221

23-
import { mount } from 'cypress/react18'
22+
import { mount } from "cypress/react18";
2423

2524
// Augment the Cypress namespace to include type definitions for
2625
// your custom command.
2726
// Alternatively, can be defined in cypress/support/component.d.ts
2827
// with a <reference path="./component" /> at the top of your spec.
2928
declare global {
29+
// eslint-disable-next-line @typescript-eslint/no-namespace
3030
namespace Cypress {
3131
interface Chainable {
32-
mount: typeof mount
32+
mount: typeof mount;
3333
}
3434
}
3535
}
3636

37-
Cypress.Commands.add('mount', mount)
37+
Cypress.Commands.add("mount", mount);
3838

3939
// Example use:
4040
// cy.mount(<MyComponent />)

examples/next/package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"dev": "next dev",
55
"build": "next build",
66
"start": "next start",
7-
"test:e2e": "start-server-and-test dev http://localhost:3000 \"cypress open --e2e --env \"pluginVisualRegressionImagesPath={spec_path}/__image_snapshots_local__\"\"",
8-
"test:e2e:ci": "start-server-and-test dev http://localhost:3000 \"cypress run --e2e\"",
9-
"test:ci": "cypress open --component --env \"pluginVisualRegressionImagesPath={spec_path}/__image_snapshots_local__\"",
10-
"test:ct:ci": "cypress run --component"
7+
"cypress": "cypress open --env \"pluginVisualRegressionImagesPath={spec_path}/__image_snapshots_local__\"",
8+
"cypress:ci": "cypress run --env \"pluginVisualRegressionImagesPath={spec_path}/__image_snapshots_local__\"",
9+
"test:e2e": "start-server-and-test dev http://localhost:3000 \"pnpm cypress --e2e\"",
10+
"test:e2e:ci": "start-server-and-test dev http://localhost:3000 \"pnpm cypress:ci --e2e\"",
11+
"test:ct": "start-server-and-test dev http://localhost:3000 \"pnpm cypress --component\"",
12+
"test:ct:ci": "start-server-and-test dev http://localhost:3000 \"pnpm cypress:ci --component\""
1113
},
1214
"dependencies": {
1315
"next": "latest",

0 commit comments

Comments
 (0)