diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 0c6917f65a79..000000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,119 +0,0 @@
-# unignore hidden files
-!.*
-
-**/__snapshots__
-**/_test-output
-**/build
-**/cypress/fixtures
-**/dist
-**/dist-*
-**/node_modules
-**/support/fixtures/*
-!**/support/fixtures/projects
-**/support/fixtures/projects/**/_fixtures/*
-**/support/fixtures/projects/**/static/*
-**/support/fixtures/projects/**/*.jsx
-**/support/fixtures/projects/**/fail.js
-
-system-tests/fixtures/*
-!system-tests/projects
-system-tests/projects/**/_fixtures/*
-system-tests/projects/**/static/*
-system-tests/projects/**/*.jsx
-system-tests/projects/**/fail.js
-system-tests/lib/scaffold/plugins/index.js
-system-tests/lib/scaffold/support/e2e.js
-system-tests/lib/scaffold/support/component.js
-system-tests/lib/scaffold/support/commands.js
-system-tests/test/support/projects/e2e/cypress/
-system-tests/projects/e2e/cypress/e2e/stdout_exit_early_failing.cy.js
-system-tests/projects/e2e/cypress/e2e/typescript_syntax_error.cy.ts
-system-tests/projects/config-with-ts-syntax-error/**
-system-tests/projects/config-with-ts-module-error/**
-system-tests/projects/no-specs-vue-2/**
-
-
-**/test/fixtures
-**/vendor
-
-# cli/types is linted by tslint/dtslint
-cli/types
-
-# cli/react, cli/vue, and cli/mount-utils are all copied from dist'd builds
-cli/react
-cli/vue
-cli/vue2
-cli/mount-utils
-
-# packages/example is not linted (think about changing this)
-packages/example
-
-packages/extension/test/helpers/background.js
-e2e/stdout_exit_early_failing_spec.js
-
-npm/webpack-preprocessor/cypress/tests/e2e/compile-error.js
-npm/webpack-preprocessor/examples/use-babelrc/cypress/e2e/spec.cy.js
-
-npm/cypress-schematic/src/**/*.js
-
-**/.projects
-**/*.d.ts
-**/package-lock.json
-**/tsconfig.json
-**/.vscode
-**/.history
-**/.cy
-**/.git
-
-/npm/react/bin/*
-/npm/react/**/coverage
-**/.next/**
-/npm/create-cypress-tests/initial-template
-/npm/create-cypress-tests/**/*.template.*
-
-# The global eslint configuration is not set up to parse vue@2 files
-/npm/vue2/**/*.vue
-
-npm/grep/cypress
-
-packages/data-context/test/unit/codegen/files
-packages/config/test/__fixtures__/**/*
-packages/config/test/__babel_fixtures__/**/*
-
-# community templates we test against, no need to lint
-system-tests/projects/cra-4/**/*
-system-tests/projects/cra-5/**/*
-system-tests/projects/cra-ejected/**/*
-system-tests/projects/create-react-app-configured/**/*
-system-tests/projects/create-react-app-unconfigured/**/*
-system-tests/projects/create-react-app-custom-index-html
-
-system-tests/projects/vueclivue2-unconfigured/**/*
-system-tests/projects/vueclivue2-configured/**/*
-system-tests/projects/outdated-deps-vuecli3/**/*
-
-system-tests/projects/vueclivue3-unconfigured/**/*
-system-tests/projects/vueclivue3-configured/**/*
-system-tests/projects/vueclivue3-custom-index-html
-
-system-tests/projects/vuecli5vue3-unconfigured/**/*
-system-tests/projects/vuecli5vue3-configured/**/*
-
-system-tests/projects/vue3-vite-ts-unconfigured/**/*
-system-tests/projects/vue3-vite-ts-configured/**/*
-system-tests/projects/vue3-vite-ts-custom-index-html
-
-system-tests/projects/nextjs-unconfigured/**/*
-system-tests/projects/nextjs-configured/**/*
-
-system-tests/projects/nuxtjs-vue2-unconfigured/**/*
-system-tests/projects/nuxtjs-vue2-configured/**/*
-
-system-tests/projects/react-app-webpack-5-unconfigured/**/*
-
-system-tests/project-fixtures/**
-system-tests/projects/**/*/expected-cypress*/**/*
-
-# These are generated files that are not linted
-tooling/electron-mksnapshot/bin/**
-tooling/v8-snapshot/cache/**
diff --git a/cli/.eslintignore b/cli/.eslintignore
new file mode 100644
index 000000000000..a3f72532311c
--- /dev/null
+++ b/cli/.eslintignore
@@ -0,0 +1,14 @@
+**/__snapshots__
+/build
+
+# cli/types is linted by tslint/dtslint
+/types
+
+# these are all copied from dist'd builds from the individual libs
+/angular
+/react
+/react18
+/vue
+/vue2
+/svelte
+/mount-utils
\ No newline at end of file
diff --git a/cli/__snapshots__/build_spec.js b/cli/__snapshots__/build_spec.js
index e269a15e3179..751f417d0e3a 100644
--- a/cli/__snapshots__/build_spec.js
+++ b/cli/__snapshots__/build_spec.js
@@ -1,37 +1,37 @@
exports['package.json build outputs expected properties 1'] = {
- "name": "test",
- "engines": "test engines",
- "version": "x.y.z",
- "buildInfo": "replaced by normalizePackageJson",
- "description": "Cypress is a next generation front end testing tool built for the modern web",
- "homepage": "https://github.com/cypress-io/cypress",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/cypress-io/cypress/issues"
+ 'name': 'test',
+ 'engines': 'test engines',
+ 'version': 'x.y.z',
+ 'buildInfo': 'replaced by normalizePackageJson',
+ 'description': 'Cypress is a next generation front end testing tool built for the modern web',
+ 'homepage': 'https://github.com/cypress-io/cypress',
+ 'license': 'MIT',
+ 'bugs': {
+ 'url': 'https://github.com/cypress-io/cypress/issues',
},
- "repository": {
- "type": "git",
- "url": "https://github.com/cypress-io/cypress.git"
+ 'repository': {
+ 'type': 'git',
+ 'url': 'https://github.com/cypress-io/cypress.git',
},
- "keywords": [
- "automation",
- "browser",
- "cypress",
- "cypress.io",
- "e2e",
- "end-to-end",
- "integration",
- "component",
- "mocks",
- "runner",
- "spies",
- "stubs",
- "test",
- "testing"
+ 'keywords': [
+ 'automation',
+ 'browser',
+ 'cypress',
+ 'cypress.io',
+ 'e2e',
+ 'end-to-end',
+ 'integration',
+ 'component',
+ 'mocks',
+ 'runner',
+ 'spies',
+ 'stubs',
+ 'test',
+ 'testing',
],
- "types": "types",
- "scripts": {
- "postinstall": "node index.js --exec install",
- "size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
- }
+ 'types': 'types',
+ 'scripts': {
+ 'postinstall': 'node index.js --exec install',
+ 'size': 't="$(npm pack .)"; wc -c "${t}"; tar tvf "${t}"; rm "${t}";',
+ },
}
diff --git a/cli/__snapshots__/cypress_spec.js b/cli/__snapshots__/cypress_spec.js
index 875a36c441b7..f603cfb784e9 100644
--- a/cli/__snapshots__/cypress_spec.js
+++ b/cli/__snapshots__/cypress_spec.js
@@ -1,4 +1,4 @@
exports['cypress .run resolves with contents of tmp file 1'] = {
- "code": 0,
- "failingTests": []
+ 'code': 0,
+ 'failingTests': [],
}
diff --git a/cli/__snapshots__/errors_spec.js b/cli/__snapshots__/errors_spec.js
index 0b0fdd013540..05e1ce7edcb9 100644
--- a/cli/__snapshots__/errors_spec.js
+++ b/cli/__snapshots__/errors_spec.js
@@ -50,8 +50,8 @@ Cypress Version: 1.2.3
`
exports['child kill error object'] = {
- "description": "The Test Runner unexpectedly exited via a [36mexit[39m event with signal [36mSIGKILL[39m",
- "solution": "Please search Cypress documentation for possible solutions:\n\n [34mhttps://on.cypress.io[39m\n\nCheck if there is a GitHub issue describing this crash:\n\n [34mhttps://github.com/cypress-io/cypress/issues[39m\n\nConsider opening a new issue."
+ 'description': 'The Test Runner unexpectedly exited via a [36mexit[39m event with signal [36mSIGKILL[39m',
+ 'solution': 'Please search Cypress documentation for possible solutions:\n\n [34mhttps://on.cypress.io[39m\n\nCheck if there is a GitHub issue describing this crash:\n\n [34mhttps://github.com/cypress-io/cypress/issues[39m\n\nConsider opening a new issue.',
}
exports['Error message'] = `
@@ -74,29 +74,29 @@ Cypress Version: 1.2.3
`
exports['errors individual has the following errors 1'] = [
- "CYPRESS_RUN_BINARY",
- "binaryNotExecutable",
- "childProcessKilled",
- "failedDownload",
- "failedUnzip",
- "failedUnzipWindowsMaxPathLength",
- "incompatibleHeadlessFlags",
- "incompatibleTestTypeFlags",
- "incompatibleTestingTypeAndFlag",
- "invalidCacheDirectory",
- "invalidConfigFile",
- "invalidCypressEnv",
- "invalidOS",
- "invalidRunProjectPath",
- "invalidSmokeTestDisplayError",
- "invalidTestingType",
- "missingApp",
- "missingDependency",
- "missingXvfb",
- "nonZeroExitCodeXvfb",
- "notInstalledCI",
- "smokeTestFailure",
- "unexpected",
- "unknownError",
- "versionMismatch"
+ 'CYPRESS_RUN_BINARY',
+ 'binaryNotExecutable',
+ 'childProcessKilled',
+ 'failedDownload',
+ 'failedUnzip',
+ 'failedUnzipWindowsMaxPathLength',
+ 'incompatibleHeadlessFlags',
+ 'incompatibleTestTypeFlags',
+ 'incompatibleTestingTypeAndFlag',
+ 'invalidCacheDirectory',
+ 'invalidConfigFile',
+ 'invalidCypressEnv',
+ 'invalidOS',
+ 'invalidRunProjectPath',
+ 'invalidSmokeTestDisplayError',
+ 'invalidTestingType',
+ 'missingApp',
+ 'missingDependency',
+ 'missingXvfb',
+ 'nonZeroExitCodeXvfb',
+ 'notInstalledCI',
+ 'smokeTestFailure',
+ 'unexpected',
+ 'unknownError',
+ 'versionMismatch',
]
diff --git a/cli/__snapshots__/run_spec.js b/cli/__snapshots__/run_spec.js
index 1d9b1bb4bf72..49d3ba1b8ef0 100644
--- a/cli/__snapshots__/run_spec.js
+++ b/cli/__snapshots__/run_spec.js
@@ -1,27 +1,27 @@
exports['exec run .processRunOptions does not remove --record option when using --browser 1'] = [
- "--run-project",
+ '--run-project',
null,
- "--browser",
- "test browser",
- "--record",
- "foo"
+ '--browser',
+ 'test browser',
+ '--record',
+ 'foo',
]
exports['exec run .processRunOptions passes --browser option 1'] = [
- "--run-project",
+ '--run-project',
null,
- "--browser",
- "test browser"
+ '--browser',
+ 'test browser',
]
exports['exec run .processRunOptions passes --record option 1'] = [
- "--run-project",
+ '--run-project',
null,
- "--record",
- "my record id"
+ '--record',
+ 'my record id',
]
exports['exec run .processRunOptions defaults to e2e testingType 1'] = [
- "--run-project",
- null
+ '--run-project',
+ null,
]
diff --git a/cli/__snapshots__/spawn_spec.js b/cli/__snapshots__/spawn_spec.js
index 797395f38fdc..9af35625fca4 100644
--- a/cli/__snapshots__/spawn_spec.js
+++ b/cli/__snapshots__/spawn_spec.js
@@ -1,18 +1,18 @@
exports['lib/exec/spawn .start forces colors and streams when supported 1'] = {
- "FORCE_COLOR": "1",
- "DEBUG_COLORS": "1",
- "MOCHA_COLORS": "1",
- "FORCE_STDIN_TTY": "1",
- "FORCE_STDOUT_TTY": "1",
- "FORCE_STDERR_TTY": "1"
+ 'FORCE_COLOR': '1',
+ 'DEBUG_COLORS': '1',
+ 'MOCHA_COLORS': '1',
+ 'FORCE_STDIN_TTY': '1',
+ 'FORCE_STDOUT_TTY': '1',
+ 'FORCE_STDERR_TTY': '1',
}
exports['lib/exec/spawn .start does not force colors and streams when not supported 1'] = {
- "FORCE_COLOR": "0",
- "DEBUG_COLORS": "0",
- "FORCE_STDIN_TTY": "0",
- "FORCE_STDOUT_TTY": "0",
- "FORCE_STDERR_TTY": "0"
+ 'FORCE_COLOR': '0',
+ 'DEBUG_COLORS': '0',
+ 'FORCE_STDIN_TTY': '0',
+ 'FORCE_STDOUT_TTY': '0',
+ 'FORCE_STDERR_TTY': '0',
}
exports['lib/exec/spawn .start detects kill signal exits with error on SIGKILL 1'] = `
diff --git a/cli/__snapshots__/util_spec.js b/cli/__snapshots__/util_spec.js
index 525f9bf06c8c..c65580b8953b 100644
--- a/cli/__snapshots__/util_spec.js
+++ b/cli/__snapshots__/util_spec.js
@@ -1,27 +1,27 @@
exports['config_as_object 1'] = {
- "config": "{\"baseUrl\":\"http://localhost:2000\",\"watchForFileChanges\":false}"
+ 'config': '{"baseUrl":"http://localhost:2000","watchForFileChanges":false}',
}
exports['env_as_object 1'] = {
- "env": "{\"foo\":\"bar\",\"magicNumber\":1234,\"host\":\"kevin.dev.local\"}"
+ 'env': '{"foo":"bar","magicNumber":1234,"host":"kevin.dev.local"}',
}
exports['env_as_string 1'] = {
- "env": "foo=bar"
+ 'env': 'foo=bar',
}
exports['others_unchanged 1'] = {
- "foo": "bar"
+ 'foo': 'bar',
}
exports['reporter_options_as_object 1'] = {
- "reporterOptions": "{\"mochaFile\":\"results/my-test-output.xml\",\"toConsole\":true}"
+ 'reporterOptions': '{"mochaFile":"results/my-test-output.xml","toConsole":true}',
}
exports['spec_as_array 1'] = {
- "spec": "[\"a\",\"b\",\"c\"]"
+ 'spec': '["a","b","c"]',
}
exports['spec_as_string 1'] = {
- "spec": "x,y,z"
+ 'spec': 'x,y,z',
}
diff --git a/cli/package.json b/cli/package.json
index 0cb51269c791..a9f70660e5ec 100644
--- a/cli/package.json
+++ b/cli/package.json
@@ -16,6 +16,7 @@
"test-unit": "yarn unit",
"test-watch": "yarn unit --watch",
"types": "yarn dtslint",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .",
"unit": "cross-env BLUEBIRD_DEBUG=1 NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../mocha-reporter-config.json"
},
"dependencies": {
diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts
index a8fa4d21a07b..85e2d0722b41 100644
--- a/cli/types/cypress.d.ts
+++ b/cli/types/cypress.d.ts
@@ -1,3 +1,4 @@
+/* eslint-disable @typescript-eslint/no-unused-vars */
///
///
///
@@ -470,19 +471,19 @@ declare namespace Cypress {
add(name: T, options: CommandOptions & {prevSubject: false}, fn: CommandFn): void
add(name: T, options: CommandOptions & {prevSubject: true}, fn: CommandFnWithSubject): void
add(
- name: T, options: CommandOptions & { prevSubject: S | ['optional'] }, fn: CommandFnWithSubject,
+ name: T, options: CommandOptions & { prevSubject: S | ['optional'] }, fn: CommandFnWithSubject,
): void
add(
- name: T, options: CommandOptions & { prevSubject: S[] }, fn: CommandFnWithSubject[S]>,
+ name: T, options: CommandOptions & { prevSubject: S[] }, fn: CommandFnWithSubject[S]>,
): void
addAll(fns: CommandFns): void
addAll(options: CommandOptions & {prevSubject: false}, fns: CommandFns): void
addAll(options: CommandOptions & { prevSubject: true }, fns: CommandFnsWithSubject): void
addAll(
- options: CommandOptions & { prevSubject: S | ['optional'] }, fns: CommandFnsWithSubject,
+ options: CommandOptions & { prevSubject: S | ['optional'] }, fns: CommandFnsWithSubject,
): void
addAll(
- options: CommandOptions & { prevSubject: S[] }, fns: CommandFnsWithSubject[S]>,
+ options: CommandOptions & { prevSubject: S[] }, fns: CommandFnsWithSubject[S]>,
): void
overwrite(name: T, fn: CommandFnWithOriginalFn): void
overwrite(name: T, fn: CommandFnWithOriginalFnAndSubject): void
@@ -676,8 +677,8 @@ declare namespace Cypress {
type CanReturnChainable = void | Chainable | Promise
type ThenReturn =
R extends void ? Chainable :
- R extends R | undefined ? Chainable> :
- Chainable
+ R extends R | undefined ? Chainable> :
+ Chainable
/**
* Chainable interface for non-array Subjects
@@ -2373,8 +2374,8 @@ declare namespace Cypress {
type ChainableMethods = {
[P in keyof Chainable]: Chainable[P] extends ((...args: any[]) => any)
- ? Chainable[P]
- : never
+ ? Chainable[P]
+ : never
}
interface SinonSpyAgent {
@@ -3112,8 +3113,8 @@ declare namespace Cypress {
type PickConfigOpt = T extends keyof DefineDevServerConfig ? DefineDevServerConfig[T] : any
interface AngularDevServerProjectConfig {
- root: string,
- sourceRoot: string,
+ root: string
+ sourceRoot: string
buildOptions: Record
}
@@ -3162,7 +3163,7 @@ declare namespace Cypress {
/**
* Hosts mappings to IP addresses.
*/
- hosts?: null | {[key: string]: string}
+ hosts?: null | {[key: string]: string}
}
interface PluginConfigOptions extends ResolvedConfigOptions, RuntimeConfigOptions {
diff --git a/npm/angular/.eslintignore b/npm/angular/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/angular/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/angular/package.json b/npm/angular/package.json
index 72cc5afaec3d..206047edca16 100644
--- a/npm/angular/package.json
+++ b/npm/angular/package.json
@@ -8,7 +8,8 @@
"build": "rollup -c rollup.config.mjs",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
- "check-ts": "tsc --noEmit"
+ "check-ts": "tsc --noEmit",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {},
"devDependencies": {
diff --git a/npm/create-cypress-tests/.eslintignore b/npm/create-cypress-tests/.eslintignore
new file mode 100644
index 000000000000..341078756065
--- /dev/null
+++ b/npm/create-cypress-tests/.eslintignore
@@ -0,0 +1,9 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/test/fixtures
+**/__snapshots__
+/initial-template
+/**/*.template.*
\ No newline at end of file
diff --git a/npm/create-cypress-tests/package.json b/npm/create-cypress-tests/package.json
index d6b0456c8f4c..969dff7c97c6 100644
--- a/npm/create-cypress-tests/package.json
+++ b/npm/create-cypress-tests/package.json
@@ -9,7 +9,8 @@
"prepare-example": "node scripts/example copy-to ./initial-template",
"prepare-copy-templates": "node scripts/copy-templates copy-to ./dist/src",
"test": "cross-env TS_NODE_PROJECT=./tsconfig.test.json mocha --config .mocharc.json './src/**/*.test.ts'",
- "test:watch": "yarn test -w"
+ "test:watch": "yarn test -w",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {
"@babel/core": "^7.5.4",
diff --git a/npm/cypress-schematic/.eslintignore b/npm/cypress-schematic/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/cypress-schematic/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/cypress-schematic/package.json b/npm/cypress-schematic/package.json
index e1e8341e5e32..eb63ce1f7e9d 100644
--- a/npm/cypress-schematic/package.json
+++ b/npm/cypress-schematic/package.json
@@ -6,7 +6,8 @@
"scripts": {
"build": "tsc -p tsconfig.json",
"build:watch": "tsc -p tsconfig.json --watch",
- "test": "mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json src/**/*.spec.ts"
+ "test": "mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json src/**/*.spec.ts",
+ "lint": "eslint --ext .ts,.json, ."
},
"dependencies": {
"@angular-devkit/architect": "^0.1402.1",
diff --git a/npm/mount-utils/.eslintignore b/npm/mount-utils/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/mount-utils/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/mount-utils/package.json b/npm/mount-utils/package.json
index 8ab99841eecb..2f04a31b9be7 100644
--- a/npm/mount-utils/package.json
+++ b/npm/mount-utils/package.json
@@ -8,7 +8,8 @@
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
"check-ts": "tsc --noEmit",
- "watch": "tsc -w"
+ "watch": "tsc -w",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {},
"devDependencies": {
diff --git a/npm/react/.eslintignore b/npm/react/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/react/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/react/package.json b/npm/react/package.json
index 2447db256c22..502d3b262887 100644
--- a/npm/react/package.json
+++ b/npm/react/package.json
@@ -12,6 +12,7 @@
"cy:run": "node ../../scripts/cypress.js run --component",
"cy:run:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}",
"test": "yarn cy:run",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
},
"devDependencies": {
diff --git a/npm/react18/.eslintignore b/npm/react18/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/react18/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/react18/package.json b/npm/react18/package.json
index 35177a111169..7268e0e2bb8c 100644
--- a/npm/react18/package.json
+++ b/npm/react18/package.json
@@ -7,7 +7,8 @@
"build": "rimraf dist && rollup -c rollup.config.mjs",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
- "watch": "yarn build --watch --watch.exclude ./dist/**/*"
+ "watch": "yarn build --watch --watch.exclude ./dist/**/*",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"devDependencies": {
"@cypress/mount-utils": "0.0.0-development",
diff --git a/npm/svelte/.eslintignore b/npm/svelte/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/svelte/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/svelte/package.json b/npm/svelte/package.json
index 232eb02a95d5..e061dec3bbe4 100644
--- a/npm/svelte/package.json
+++ b/npm/svelte/package.json
@@ -8,6 +8,7 @@
"build": "rollup -c rollup.config.mjs",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
"check-ts": "tsc --noEmit"
},
"devDependencies": {
diff --git a/npm/vite-dev-server/.eslintignore b/npm/vite-dev-server/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/vite-dev-server/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json
index ac9f49f2a45e..0a431ff76921 100644
--- a/npm/vite-dev-server/package.json
+++ b/npm/vite-dev-server/package.json
@@ -12,7 +12,8 @@
"cypress:open": "yarn cypress:run-cypress-in-cypress gulp open --project .",
"watch": "tsc -w",
"test": "yarn test-unit",
- "test-unit": "mocha -r ts-node/register/transpile-only --config ./test/.mocharc.js"
+ "test-unit": "mocha -r ts-node/register/transpile-only --config ./test/.mocharc.js",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {
"debug": "^4.3.4",
diff --git a/npm/vue/.eslintignore b/npm/vue/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/vue/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/vue/package.json b/npm/vue/package.json
index 85cc3b8d68fd..fa5523c09dcd 100644
--- a/npm/vue/package.json
+++ b/npm/vue/package.json
@@ -10,6 +10,8 @@
"build": "rimraf dist && rollup -c rollup.config.mjs",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"typecheck": "yarn tsd && vue-tsc --noEmit",
+ "check-ts": "yarn tsd && vue-tsc --noEmit",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .",
"test": "yarn cy:run",
"tsd": "yarn build && yarn tsc -p test-tsd/tsconfig.tsd.json",
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
diff --git a/npm/vue2/.eslintignore b/npm/vue2/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/npm/vue2/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/npm/vue2/package.json b/npm/vue2/package.json
index 3193201e89af..dea49368f93f 100644
--- a/npm/vue2/package.json
+++ b/npm/vue2/package.json
@@ -9,7 +9,9 @@
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
"test": "echo \"Tests for @cypress/vue2 are run from system-tests\"",
- "watch": "yarn build --watch --watch.exclude ./dist/**/*"
+ "watch": "yarn build --watch --watch.exclude ./dist/**/*",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .",
+ "test-ci": "node ../../scripts/run-ct-examples.js --examplesList=./examples.env"
},
"devDependencies": {
"@cypress/mount-utils": "0.0.0-development",
diff --git a/npm/webpack-batteries-included-preprocessor/package.json b/npm/webpack-batteries-included-preprocessor/package.json
index f6b1274840fa..6e0c3253e9ef 100644
--- a/npm/webpack-batteries-included-preprocessor/package.json
+++ b/npm/webpack-batteries-included-preprocessor/package.json
@@ -4,7 +4,8 @@
"description": "Cypress preprocessor for bundling JavaScript via webpack with dependencies included and support for various ES features, TypeScript, and CoffeeScript",
"private": false,
"scripts": {
- "test": "mocha test/e2e/*.spec.* --timeout 4000"
+ "test": "mocha test/e2e/*.spec.* --timeout 4000",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {
"@babel/core": "^7.11.1",
diff --git a/npm/webpack-dev-server/.eslintignore b/npm/webpack-dev-server/.eslintignore
new file mode 100644
index 000000000000..8d2416a026fd
--- /dev/null
+++ b/npm/webpack-dev-server/.eslintignore
@@ -0,0 +1,7 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/test/fixtures
+**/__snapshots__
\ No newline at end of file
diff --git a/npm/webpack-dev-server/package.json b/npm/webpack-dev-server/package.json
index 810ddf973f9e..1a6deced9929 100644
--- a/npm/webpack-dev-server/package.json
+++ b/npm/webpack-dev-server/package.json
@@ -14,7 +14,8 @@
"cypress:run-cypress-in-cypress": "cross-env HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS=http://localhost:4455 CYPRESS_REMOTE_DEBUGGING_PORT=6666 TZ=America/New_York",
"cypress:open": "yarn cypress:run-cypress-in-cypress gulp open --project .",
"test": "yarn test-unit",
- "test-unit": "mocha -r ts-node/register/transpile-only --config ./test/.mocharc.js"
+ "test-unit": "mocha -r ts-node/register/transpile-only --config ./test/.mocharc.js",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {
"find-up": "6.3.0",
diff --git a/npm/webpack-preprocessor/.eslintignore b/npm/webpack-preprocessor/.eslintignore
new file mode 100644
index 000000000000..80214d2997c1
--- /dev/null
+++ b/npm/webpack-preprocessor/.eslintignore
@@ -0,0 +1,9 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/test/fixtures
+**/_test-output
+/cypress/tests/e2e/compile-error.js
+/examples/use-babelrc/cypress/e2e/spec.cy.js
\ No newline at end of file
diff --git a/npm/webpack-preprocessor/package.json b/npm/webpack-preprocessor/package.json
index 1b1252809ea5..7f3d79b06ef9 100644
--- a/npm/webpack-preprocessor/package.json
+++ b/npm/webpack-preprocessor/package.json
@@ -17,7 +17,8 @@
"test-unit": "mocha test/unit/*.spec.*",
"test-watch": "yarn test-unit & chokidar '**/*.(js|ts)' 'test/unit/*.(js|ts)' -c 'yarn test-unit'",
"check-ts": "tsc --noEmit",
- "watch": "rimraf dist && tsc --watch"
+ "watch": "rimraf dist && tsc --watch",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"@babel/parser": "7.13.0",
diff --git a/package.json b/package.json
index b21450522d6f..140c04ff9b2c 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
"get-next-version": "node scripts/get-next-version.js",
"postinstall": "node ./scripts/run-postInstall.js",
"jscodeshift": "jscodeshift -t ./node_modules/js-codemod/transforms/arrow-function-arguments.js",
- "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .",
+ "lint": "lerna run lint --no-bail",
"lint-changed": "lint-changed",
"prepare-release-artifacts": "node ./scripts/prepare-release-artifacts.js",
"npm-release": "node scripts/npm-release.js",
diff --git a/packages/app/.eslintignore b/packages/app/.eslintignore
new file mode 100644
index 000000000000..0a4f19fad609
--- /dev/null
+++ b/packages/app/.eslintignore
@@ -0,0 +1,7 @@
+**/dist
+**/dist-*
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+/src/store/mobx-runner-store.ts
\ No newline at end of file
diff --git a/packages/app/package.json b/packages/app/package.json
index f748e6418b45..0d83a0a21ca3 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -15,7 +15,8 @@
"cypress:run:e2e": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --project .",
"dev": "yarn cypress:run-cypress-in-cypress gulp dev --project .",
"start": "echo \"run 'yarn dev' from the root\" && exit 1",
- "watch": "echo \"run 'yarn dev' from the root\" && exit 1"
+ "watch": "echo \"run 'yarn dev' from the root\" && exit 1",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {},
"devDependencies": {
diff --git a/packages/config/.eslintignore b/packages/config/.eslintignore
new file mode 100644
index 000000000000..d9c909f1aed8
--- /dev/null
+++ b/packages/config/.eslintignore
@@ -0,0 +1,8 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+/test/__fixtures__/**/*
+/test/__babel_fixtures__/**/*
+**/__snapshots__
\ No newline at end of file
diff --git a/packages/config/package.json b/packages/config/package.json
index c667b832c518..0ed4098d1bab 100644
--- a/packages/config/package.json
+++ b/packages/config/package.json
@@ -13,7 +13,8 @@
"test": "yarn test-unit",
"test:clean": "find ./test/__fixtures__ -depth -name 'output.*' -type f -exec rm {} \\;",
"test-debug": "yarn test-unit --inspect-brk=5566",
- "test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json -r @packages/ts/register 'test/**/*.spec.ts' --exit --timeout 5000"
+ "test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json -r @packages/ts/register 'test/**/*.spec.ts' --exit --timeout 5000",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {
"@babel/core": "^7",
diff --git a/packages/data-context/.eslintignore b/packages/data-context/.eslintignore
new file mode 100644
index 000000000000..055ebf00d392
--- /dev/null
+++ b/packages/data-context/.eslintignore
@@ -0,0 +1,9 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+/test/unit/codegen/files
+/test/unit/codegen/tmp
+/test/fixtures/**
+**/__snapshots__
\ No newline at end of file
diff --git a/packages/data-context/.eslintrc.json b/packages/data-context/.eslintrc.json
new file mode 100644
index 000000000000..17811611e289
--- /dev/null
+++ b/packages/data-context/.eslintrc.json
@@ -0,0 +1,16 @@
+{
+ "extends": [
+ "../../.eslintrc.js"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "overrides": [
+ {
+ "files": [
+ "*.ts"
+ ],
+ "rules": {
+ "@typescript-eslint/no-unused-vars": "off"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/data-context/package.json b/packages/data-context/package.json
index b32db476bbf7..51bb4699488c 100644
--- a/packages/data-context/package.json
+++ b/packages/data-context/package.json
@@ -11,7 +11,8 @@
"tslint": "tslint --config ../ts/tslint.json --project .",
"clean": "rimraf --glob \"./{src,test}/**/*.js\"",
"test": "yarn test-unit",
- "test-unit": "mocha -r @packages/ts/register --config ./test/.mocharc.js --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json"
+ "test-unit": "mocha -r @packages/ts/register --config ./test/.mocharc.js --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
+ "lint": "eslint --ext .js,.ts,.json, ."
},
"dependencies": {
"@babel/code-frame": "7.8.3",
diff --git a/packages/driver/.eslintignore b/packages/driver/.eslintignore
new file mode 100644
index 000000000000..2b42008bda67
--- /dev/null
+++ b/packages/driver/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
diff --git a/packages/driver/package.json b/packages/driver/package.json
index fac3a0e81a7f..1722a77d849d 100644
--- a/packages/driver/package.json
+++ b/packages/driver/package.json
@@ -10,7 +10,8 @@
"cypress:open-experimentalSessionAndOrigin": "node ../../scripts/cypress open --config experimentalSessionAndOrigin=true,experimentalModifyObstructiveThirdPartyCode=true",
"cypress:run-experimentalSessionAndOrigin": "node ../../scripts/cypress run --config experimentalSessionAndOrigin=true,experimentalModifyObstructiveThirdPartyCode=true",
"postinstall": "patch-package",
- "start": "node -e 'console.log(require(`chalk`).red(`\nError:\n\tRunning \\`yarn start\\` is no longer needed for driver/cypress tests.\n\tWe now automatically spawn the server in e2e.setupNodeEvents config.\n\tChanges to the server will be watched and reloaded automatically.`))'"
+ "start": "node -e 'console.log(require(`chalk`).red(`\nError:\n\tRunning \\`yarn start\\` is no longer needed for driver/cypress tests.\n\tWe now automatically spawn the server in e2e.setupNodeEvents config.\n\tChanges to the server will be watched and reloaded automatically.`))'",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {},
"devDependencies": {
diff --git a/packages/electron/.eslintignore b/packages/electron/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/packages/electron/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/packages/electron/package.json b/packages/electron/package.json
index b1985c65178e..00818e8e1a6d 100644
--- a/packages/electron/package.json
+++ b/packages/electron/package.json
@@ -12,7 +12,8 @@
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
- "test-watch": "yarn test-unit --watch"
+ "test-watch": "yarn test-unit --watch",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"@packages/icons": "0.0.0-development",
diff --git a/packages/errors/package.json b/packages/errors/package.json
index 4296ee1c1da1..78c729eb9630 100644
--- a/packages/errors/package.json
+++ b/packages/errors/package.json
@@ -14,7 +14,8 @@
"clean": "rimraf ./src/*.js ./src/**/*.js ./src/**/**/*.js ./test/**/*.js || echo 'cleaned'",
"pretest-unit": "yarn clean",
"test-unit": "mocha",
- "test-electron": "HTML_IMAGE_CONVERSION=1 xvfb-maybe electron --no-sandbox ./node_modules/.bin/_mocha"
+ "test-electron": "HTML_IMAGE_CONVERSION=1 xvfb-maybe electron --no-sandbox ./node_modules/.bin/_mocha",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"ansi_up": "5.0.0",
diff --git a/packages/extension/.eslintignore b/packages/extension/.eslintignore
new file mode 100644
index 000000000000..3405de2acf70
--- /dev/null
+++ b/packages/extension/.eslintignore
@@ -0,0 +1,6 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+/test/helpers/background.js
\ No newline at end of file
diff --git a/packages/extension/package.json b/packages/extension/package.json
index a0a17927efcb..e72c7e0c433b 100644
--- a/packages/extension/package.json
+++ b/packages/extension/package.json
@@ -13,7 +13,8 @@
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "cross-env NODE_ENV=test mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test-watch": "yarn test-unit --watch",
- "watch": "node ../../scripts/run-webpack --watch --progress"
+ "watch": "node ../../scripts/run-webpack --watch --progress",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"bluebird": "3.5.3",
diff --git a/packages/frontend-shared/.eslintignore b/packages/frontend-shared/.eslintignore
new file mode 100644
index 000000000000..2b42008bda67
--- /dev/null
+++ b/packages/frontend-shared/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json
index bfa8b404e2c2..7c4b7fe66610 100644
--- a/packages/frontend-shared/package.json
+++ b/packages/frontend-shared/package.json
@@ -14,7 +14,8 @@
"dev": "gulp dev --project .",
"generate-shiki-theme": "node ./script/generate-shiki-theme.js",
"generate-stub-specs": "node ./script/generate-stub-specs.js",
- "postinstall": "patch-package"
+ "postinstall": "patch-package",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue ."
},
"dependencies": {},
"devDependencies": {
diff --git a/packages/graphql/package.json b/packages/graphql/package.json
index b6f5dc284852..33f67de997eb 100644
--- a/packages/graphql/package.json
+++ b/packages/graphql/package.json
@@ -12,7 +12,8 @@
"tslint": "tslint --config ../ts/tslint.json --project .",
"postinstall": "echo '@packages/graphql needs: yarn build'",
"test-unit": "mocha -r @packages/ts/register test/unit/**/*.spec.ts --config ./test/.mocharc.js --exit",
- "test-integration": "mocha -r @packages/ts/register test/integration/**/*.spec.ts --config ./test/.mocharc.js --exit"
+ "test-integration": "mocha -r @packages/ts/register test/integration/**/*.spec.ts --config ./test/.mocharc.js --exit",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"@graphql-tools/delegate": "8.2.1",
diff --git a/packages/https-proxy/package.json b/packages/https-proxy/package.json
index 4b77bac00c7c..8df5553e8953 100644
--- a/packages/https-proxy/package.json
+++ b/packages/https-proxy/package.json
@@ -11,7 +11,8 @@
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "cross-env NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
- "test-watch": "cross-env NODE_ENV=test mocha --watch"
+ "test-watch": "cross-env NODE_ENV=test mocha --watch",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"bluebird": "3.5.3",
diff --git a/packages/icons/.eslintignore b/packages/icons/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/packages/icons/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/packages/icons/package.json b/packages/icons/package.json
index 9f4061ef8c40..c7f03394415a 100644
--- a/packages/icons/package.json
+++ b/packages/icons/package.json
@@ -8,7 +8,8 @@
"build-prod": "yarn build",
"build": "ts-node ./scripts/build.ts && ts-node ./scripts/ico.ts",
"test-unit": "NODE_ENV=test mocha -r @packages/ts/register test/*.ts",
- "test": "yarn test-unit"
+ "test": "yarn test-unit",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"devDependencies": {
"@types/mocha": "^8.0.3",
diff --git a/packages/launcher/.eslintignore b/packages/launcher/.eslintignore
new file mode 100644
index 000000000000..15730005ffd1
--- /dev/null
+++ b/packages/launcher/.eslintignore
@@ -0,0 +1,7 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/__snapshots__
+index.js
\ No newline at end of file
diff --git a/packages/launcher/package.json b/packages/launcher/package.json
index 273c284a18b7..5fb91d122112 100644
--- a/packages/launcher/package.json
+++ b/packages/launcher/package.json
@@ -9,7 +9,8 @@
"clean-js": "yarn clean",
"size": "t=\"cypress-v0.0.0.tgz\"; yarn pack --filename \"${t}\"; wc -c \"cli/${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
"test": "yarn test-unit",
- "test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json"
+ "test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"bluebird": "3.5.3",
diff --git a/packages/launchpad/.eslintignore b/packages/launchpad/.eslintignore
new file mode 100644
index 000000000000..ad1d543ef43b
--- /dev/null
+++ b/packages/launchpad/.eslintignore
@@ -0,0 +1,6 @@
+**/dist
+**/dist-*
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json
index 1a991b217a93..75bfcabede88 100644
--- a/packages/launchpad/package.json
+++ b/packages/launchpad/package.json
@@ -15,7 +15,8 @@
"cypress:run:e2e": "cross-env TZ=America/New_York node ../../scripts/cypress run --e2e --project .",
"dev": "yarn gulp dev --project .",
"start": "echo 'run yarn dev from the root' && exit 1",
- "watch": "echo 'run yarn dev from the root' && exit 1"
+ "watch": "echo 'run yarn dev from the root' && exit 1",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {},
"devDependencies": {
diff --git a/packages/net-stubbing/.eslintignore b/packages/net-stubbing/.eslintignore
new file mode 100644
index 000000000000..2b42008bda67
--- /dev/null
+++ b/packages/net-stubbing/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
diff --git a/packages/net-stubbing/package.json b/packages/net-stubbing/package.json
index d1ed4680c4a2..72e4ecb686b1 100644
--- a/packages/net-stubbing/package.json
+++ b/packages/net-stubbing/package.json
@@ -6,7 +6,8 @@
"scripts": {
"build-prod": "tsc --project .",
"clean-deps": "rimraf node_modules",
- "test": "CYPRESS_INTERNAL_ENV=test mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json --exit test/unit/*"
+ "test": "CYPRESS_INTERNAL_ENV=test mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json --exit test/unit/*",
+ "lint": "eslint --ext .ts,.json, ."
},
"dependencies": {
"@types/mime-types": "2.1.0",
diff --git a/packages/network/package.json b/packages/network/package.json
index d73bf492204d..429165b45450 100644
--- a/packages/network/package.json
+++ b/packages/network/package.json
@@ -10,7 +10,8 @@
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
- "test-watch": "yarn test-unit --watch"
+ "test-watch": "yarn test-unit --watch",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"@cypress/parse-domain": "2.4.0",
diff --git a/packages/proxy/package.json b/packages/proxy/package.json
index d3b7f0f6c139..614d9007bd1d 100644
--- a/packages/proxy/package.json
+++ b/packages/proxy/package.json
@@ -10,7 +10,8 @@
"run-mocha": "mocha -r @packages/ts/register -r test/pretest.ts --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test": "CYPRESS_INTERNAL_ENV=test yarn run-mocha \"test/integration/*.spec.ts\" \"test/unit/**/*.spec.ts\"",
"test-integration": "CYPRESS_INTERNAL_ENV=test yarn run-mocha \"test/integration/*.spec.ts\"",
- "test-unit": "CYPRESS_INTERNAL_ENV=test yarn run-mocha \"test/unit/**/*.spec.ts\""
+ "test-unit": "CYPRESS_INTERNAL_ENV=test yarn run-mocha \"test/unit/**/*.spec.ts\"",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"bluebird": "3.5.3",
diff --git a/packages/reporter/.eslintignore b/packages/reporter/.eslintignore
new file mode 100644
index 000000000000..79afe972da7d
--- /dev/null
+++ b/packages/reporter/.eslintignore
@@ -0,0 +1,5 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
\ No newline at end of file
diff --git a/packages/reporter/.eslintrc.json b/packages/reporter/.eslintrc.json
new file mode 100644
index 000000000000..a40ae6a0de2d
--- /dev/null
+++ b/packages/reporter/.eslintrc.json
@@ -0,0 +1,23 @@
+{
+ "plugins": [
+ "cypress",
+ "@cypress/dev"
+ ],
+ "extends": [
+ "../../.eslintrc.js"
+ ],
+ "env": {
+ "cypress/globals": true
+ },
+ "overrides": [
+ {
+ "files": [
+ "*.ts",
+ "*.tsx"
+ ],
+ "rules": {
+ "@typescript-eslint/no-unused-vars": "off"
+ }
+ }
+ ]
+}
diff --git a/packages/reporter/package.json b/packages/reporter/package.json
index 9f990b666ca6..71513df849c4 100644
--- a/packages/reporter/package.json
+++ b/packages/reporter/package.json
@@ -9,7 +9,8 @@
"cypress:open": "node ../../scripts/cypress open --project .",
"cypress:run": "node ../../scripts/cypress run --project .",
"cypress:run:ct": "cross-env TZ=America/New_York node ../../scripts/cypress run --component --project .",
- "watch": "yarn build-for-tests --watch --progress"
+ "watch": "yarn build-for-tests --watch --progress",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"devDependencies": {
"@cypress/react-tooltip": "0.5.3",
diff --git a/packages/resolve-dist/package.json b/packages/resolve-dist/package.json
index f5bf02d1a861..03a201f6b0c8 100644
--- a/packages/resolve-dist/package.json
+++ b/packages/resolve-dist/package.json
@@ -7,10 +7,7 @@
"build-prod": "tsc --project .",
"clean": "rimraf 'lib/**/*.js'",
"clean-deps": "rimraf node_modules",
- "test": "yarn test-unit",
- "test-debug": "yarn test-unit --inspect-brk=5566",
- "test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
- "test-watch": "yarn test-unit --watch"
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"fs-extra": "9.1.0"
diff --git a/packages/rewriter/.eslintignore b/packages/rewriter/.eslintignore
new file mode 100644
index 000000000000..677df239bad1
--- /dev/null
+++ b/packages/rewriter/.eslintignore
@@ -0,0 +1,7 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/__snapshots__
+**/test/fixtures
\ No newline at end of file
diff --git a/packages/rewriter/package.json b/packages/rewriter/package.json
index 1404e852261f..f1f847af8813 100644
--- a/packages/rewriter/package.json
+++ b/packages/rewriter/package.json
@@ -8,7 +8,8 @@
"build-test": "yarn build-prod --noEmit",
"clean": "rimraf 'lib/**/*.js'",
"clean-deps": "rimraf node_modules",
- "test": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json"
+ "test": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"ast-types": "0.13.3",
diff --git a/packages/runner/.eslintignore b/packages/runner/.eslintignore
new file mode 100644
index 000000000000..fccf63150adf
--- /dev/null
+++ b/packages/runner/.eslintignore
@@ -0,0 +1,6 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/__snapshots__
\ No newline at end of file
diff --git a/packages/runner/package.json b/packages/runner/package.json
index 73c2531d5474..d9d5f0cabcef 100644
--- a/packages/runner/package.json
+++ b/packages/runner/package.json
@@ -10,7 +10,8 @@
"cypress:open": "echo \"These tests have been moved to @packages/app. \" && exit 1",
"cypress:run": "echo \"These tests have been moved to @packages/app. \" && exit 1",
"postinstall": "echo '@packages/runner needs: yarn build'",
- "watch": "node ../../scripts/run-webpack --watch --progress"
+ "watch": "node ../../scripts/run-webpack --watch --progress",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"devDependencies": {
"@cypress/react-tooltip": "0.5.3",
diff --git a/packages/scaffold-config/package.json b/packages/scaffold-config/package.json
index 4b54b05cf118..ac0f9632f1e5 100644
--- a/packages/scaffold-config/package.json
+++ b/packages/scaffold-config/package.json
@@ -10,7 +10,8 @@
"clean": "rimraf ./src/*.js ./src/**/*.js ./src/**/**/*.js ./test/**/*.js || echo 'cleaned'",
"clean-deps": "rimraf node_modules",
"test": "yarn test-unit",
- "test-unit": "mocha -r @packages/ts/register 'test/unit/**' --config ./test/.mocharc.js --exit --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json"
+ "test-unit": "mocha -r @packages/ts/register 'test/unit/**' --config ./test/.mocharc.js --exit --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"compare-versions": "4.1.3",
diff --git a/packages/server/.eslintignore b/packages/server/.eslintignore
new file mode 100644
index 000000000000..991d0b3d8fec
--- /dev/null
+++ b/packages/server/.eslintignore
@@ -0,0 +1,7 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/support/fixtures/*
+**/__snapshots__
\ No newline at end of file
diff --git a/packages/server/package.json b/packages/server/package.json
index 08a176bbedfd..50b1baccc798 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -17,7 +17,8 @@
"test": "node ./test/scripts/run.js",
"test-integration": "node ./test/scripts/run.js --glob-in-dir=test/integration",
"test-performance": "node ./test/scripts/run.js --glob-in-dir=test/performance",
- "test-unit": "node ./test/scripts/run.js --glob-in-dir=test/unit"
+ "test-unit": "node ./test/scripts/run.js --glob-in-dir=test/unit",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"@babel/parser": "7.13.0",
diff --git a/packages/socket/package.json b/packages/socket/package.json
index 62f43f687049..bb9a58e35b6c 100644
--- a/packages/socket/package.json
+++ b/packages/socket/package.json
@@ -12,7 +12,8 @@
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "cross-env NODE_ENV=test mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
- "test-watch": "cross-env NODE_ENV=test mocha -r @packages/ts/register --watch"
+ "test-watch": "cross-env NODE_ENV=test mocha -r @packages/ts/register --watch",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"circular-json": "0.5.9",
diff --git a/packages/ts/.eslintignore b/packages/ts/.eslintignore
new file mode 100644
index 000000000000..2255e970fb68
--- /dev/null
+++ b/packages/ts/.eslintignore
@@ -0,0 +1,6 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/__snapshots__
diff --git a/packages/ts/package.json b/packages/ts/package.json
index b40bf5a5dcb6..ec92c6fc893d 100644
--- a/packages/ts/package.json
+++ b/packages/ts/package.json
@@ -8,7 +8,8 @@
"postinstall": "patch-package",
"test": "yarn test-unit",
"test-unit": "node test",
- "test-watch": "echo 'no watching of tests'"
+ "test-watch": "echo 'no watching of tests'",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {
"debug": "^4.3.2",
diff --git a/packages/types/package.json b/packages/types/package.json
index 150ae6ec63c5..4f0b40750ec5 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -7,7 +7,8 @@
"scripts": {
"build-prod": "tsc || echo 'built, with type errors'",
"check-ts": "tsc --noEmit",
- "clean": "rimraf src/*.js src/**/*.js"
+ "clean": "rimraf src/*.js src/**/*.js",
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."
},
"dependencies": {},
"devDependencies": {
diff --git a/packages/ui-components/.eslintignore b/packages/ui-components/.eslintignore
new file mode 100644
index 000000000000..2255e970fb68
--- /dev/null
+++ b/packages/ui-components/.eslintignore
@@ -0,0 +1,6 @@
+**/dist
+**/*.d.ts
+**/package-lock.json
+**/tsconfig.json
+**/cypress/fixtures
+**/__snapshots__
diff --git a/system-tests/project-fixtures/react/cypress-vite-async-function-config.config.ts b/system-tests/project-fixtures/react/cypress-vite-async-function-config.config.ts
index 2a1c102daa6c..483f732c445f 100644
--- a/system-tests/project-fixtures/react/cypress-vite-async-function-config.config.ts
+++ b/system-tests/project-fixtures/react/cypress-vite-async-function-config.config.ts
@@ -25,4 +25,4 @@ module.exports = defineConfig({
},
},
})
-
\ No newline at end of file
+
diff --git a/yarn.lock b/yarn.lock
index 6cf60f529def..684bbf3d4afb 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -21667,7 +21667,7 @@ jsonc-eslint-parser@^1.0.1:
espree "^6.0.0 || ^7.2.0"
semver "^6.3.0"
-jsonc-parser@3.1.0, jsonc-parser@^3.0.0:
+jsonc-parser@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d"
integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==
@@ -21677,6 +21677,11 @@ jsonc-parser@^2.3.0:
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342"
integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==
+jsonc-parser@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
+ integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
+
jsonfile@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66"
@@ -23022,9 +23027,9 @@ lz-string@^1.4.4:
integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=
macos-release@^2.2.0:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac"
- integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.5.0.tgz#067c2c88b5f3fb3c56a375b2ec93826220fa1ff2"
+ integrity sha512-EIgv+QZ9r+814gjJj0Bt5vSLJLzswGmSUbUpbi9AIr/fsN2IWFBl2NucV9PAiek+U1STK468tEkxmVYUtuAN3g==
magic-string@0.26.2:
version "0.26.2"