Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 25 additions & 29 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
import { defineConfig, globalIgnores } from 'eslint/config'
import globals from 'globals'
import pluginJs from '@eslint/js'
import js from '@eslint/js'
import pluginCypress from 'eslint-plugin-cypress'
import stylistic from '@stylistic/eslint-plugin'

export default [
pluginJs.configs.recommended,
pluginCypress.configs.recommended,
export default defineConfig([
globalIgnores([
'dist/',
'examples/component-tests/dist/',
'examples/nextjs/.next/',
'examples/nextjs/build/',
'examples/nextjs/src/app/',
'examples/wait-on-vite/dist/',
'examples/**/.pnp.*',
]),
{
name: 'global-ignores',
ignores: [
'dist/',
'examples/component-tests/dist/',
'examples/nextjs/.next/',
'examples/nextjs/build/',
'examples/nextjs/src/app/',
'examples/wait-on-vite/dist/',
'examples/**/.pnp.*',
],
},
{
name: 'all-js',
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
name: 'style',
files: ['eslint.config.mjs', 'examples/**/*.js'],
...stylistic.configs.recommended,
extends:
[
js.configs.recommended,
pluginCypress.configs.recommended,
stylistic.configs.recommended,
],
rules: {
'@stylistic/indent': ['error', 2],
'@stylistic/arrow-parens': ['error', 'always'],
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/indent': ['error', 2],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'never'],
'@stylistic/space-before-function-paren': ['error', 'always'],
},
languageOptions: {
globals: globals.node,
},
},
]
])
4 changes: 2 additions & 2 deletions examples/browser/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const os = require('os')
module.exports = defineConfig({
fixturesFolder: false,
e2e: {
setupNodeEvents(on) {
setupNodeEvents (on) {
on('before:browser:launch', (browser, launchOptions) => {
console.log('before launching browser')
console.log(browser)
Expand All @@ -20,7 +20,7 @@ module.exports = defineConfig({
})

on('task', {
log(message) {
log (message) {
console.log(message)
return null
},
Expand Down
2 changes: 1 addition & 1 deletion examples/component-tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
2 changes: 1 addition & 1 deletion examples/config/cypress.config-alternate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = defineConfig({
fixturesFolder: false,
e2e: {
baseUrl: 'http://localhost:3333',
setupNodeEvents() {
setupNodeEvents () {
console.log('\nUsing cypress.config-alternate.js config-file')
},
supportFile: false,
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-command/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const cypress = require('cypress')
const _ = require('lodash')
const fs = require('fs')

cypress.run().then(results => {
cypress.run().then((results) => {
const summary = _.pickBy(results, (value, key) =>
key.startsWith('total'),
)
Expand Down
2 changes: 1 addition & 1 deletion examples/env/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { defineConfig } = require('cypress')
module.exports = defineConfig({
fixturesFolder: false,
e2e: {
setupNodeEvents(on, config) {
setupNodeEvents (on, config) {
console.log('logging from cypress.config.js')
console.log(
'process.env.CYPRESS_environmentName',
Expand Down
4 changes: 2 additions & 2 deletions examples/quiet/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const { defineConfig } = require('cypress')
module.exports = defineConfig({
fixturesFolder: false,
e2e: {
setupNodeEvents(on) {
setupNodeEvents (on) {
on('task', {
log(message) {
log (message) {
console.log(message)
return null
},
Expand Down
2 changes: 1 addition & 1 deletion examples/wait-on-vite/counter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function setupCounter(element) {
export function setupCounter (element) {
let counter = 0
const setCounter = (count) => {
counter = count
Expand Down
2 changes: 1 addition & 1 deletion examples/wait-on/index4.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ log('creating the server on port %d', port)
const server = http.createServer((req, res) => {
const reqTimestamp = +new Date()
log('request at %d: %s %s', reqTimestamp, req.method, req.url)
setTimeout(function() {
setTimeout(function () {
log('responding to request from %d', reqTimestamp)
res.writeHead(200)
res.end('all good')
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
},
devServer: {
static: {
directory: __dirname,
directory: __dirname,
},
},
mode: 'development',
Expand Down
89 changes: 46 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"supports-color": "9.3.1"
},
"devDependencies": {
"@eslint/js": "9.34.0",
"@stylistic/eslint-plugin": "5.2.0",
"@eslint/js": "9.37.0",
"@stylistic/eslint-plugin": "5.4.0",
"@types/node": "24.0.15",
"@vercel/ncc": "0.38.1",
"eslint": "9.34.0",
"eslint-plugin-cypress": "5.1.0",
"globals": "16.3.0",
"eslint": "9.37.0",
"eslint-plugin-cypress": "5.2.0",
"globals": "16.4.0",
"husky": "9.1.7",
"markdown-link-check": "3.14.1",
"prettier": "3.6.2"
Expand Down