Skip to content

Commit

Permalink
refactor: move linting to each lib to enable caching (#24424)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanpowell88 authored Nov 17, 2022
1 parent 8d85c80 commit ed90b14
Show file tree
Hide file tree
Showing 82 changed files with 418 additions and 266 deletions.
119 changes: 0 additions & 119 deletions .eslintignore

This file was deleted.

14 changes: 14 additions & 0 deletions cli/.eslintignore
Original file line number Diff line number Diff line change
@@ -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
64 changes: 32 additions & 32 deletions cli/__snapshots__/build_spec.js
Original file line number Diff line number Diff line change
@@ -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}";',
},
}
4 changes: 2 additions & 2 deletions cli/__snapshots__/cypress_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exports['cypress .run resolves with contents of tmp file 1'] = {
"code": 0,
"failingTests": []
'code': 0,
'failingTests': [],
}
54 changes: 27 additions & 27 deletions cli/__snapshots__/errors_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = `
Expand All @@ -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',
]
26 changes: 13 additions & 13 deletions cli/__snapshots__/run_spec.js
Original file line number Diff line number Diff line change
@@ -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,
]
22 changes: 11 additions & 11 deletions cli/__snapshots__/spawn_spec.js
Original file line number Diff line number Diff line change
@@ -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'] = `
Expand Down
14 changes: 7 additions & 7 deletions cli/__snapshots__/util_spec.js
Original file line number Diff line number Diff line change
@@ -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',
}
1 change: 1 addition & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Loading

4 comments on commit ed90b14

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ed90b14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/linux-x64/develop-ed90b14d4f187369ded9baf59f5312bea652f23e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ed90b14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/linux-arm64/develop-ed90b14d4f187369ded9baf59f5312bea652f23e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ed90b14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/darwin-arm64/develop-ed90b14d4f187369ded9baf59f5312bea652f23e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ed90b14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/win32-x64/develop-ed90b14d4f187369ded9baf59f5312bea652f23e/cypress.tgz

Please sign in to comment.