Skip to content

Commit

Permalink
fix: optimize reduce addCypressToWebpackEslintRulesInPlace (#27819)
Browse files Browse the repository at this point in the history
* fix: optimize reduce addCypressToWebpackEslintRulesInPlace

* Fix lint and types

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 29, 2024
1 parent 6842d1e commit 43792e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion npm/webpack-dev-server/src/helpers/createReactAppHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ function addCypressToWebpackEslintRulesInPlace (webpackConfig: Configuration) {

if (eslintPlugin) {
const cypressGlobalsRules = cypressGlobals
.reduce((acc, global) => ({ ...acc, [global]: 'writable' }), {})
.reduce<Record<string, string>>((acc, global) => {
acc[global] = 'writable'

return acc
}, {})

eslintPlugin.options.baseConfig = {
...eslintPlugin.options.baseConfig,
Expand Down

5 comments on commit 43792e7

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 43792e7 Jan 29, 2024

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 build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.4/linux-arm64/develop-43792e7583651318ea4653fce914a16b9fd5ae48/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 43792e7 Jan 29, 2024

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 build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.4/linux-x64/develop-43792e7583651318ea4653fce914a16b9fd5ae48/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 43792e7 Jan 29, 2024

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 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.4/darwin-x64/develop-43792e7583651318ea4653fce914a16b9fd5ae48/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 43792e7 Jan 29, 2024

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 build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.4/win32-x64/develop-43792e7583651318ea4653fce914a16b9fd5ae48/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 43792e7 Jan 29, 2024

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 build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.4/darwin-arm64/develop-43792e7583651318ea4653fce914a16b9fd5ae48/cypress.tgz

Please sign in to comment.