Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ESLint configuration for Cypress #295

Merged
merged 1 commit into from
Oct 20, 2023
Merged
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
7 changes: 7 additions & 0 deletions test/cy/.eslintrc.cjs
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is great because it extends the Cypress ESLint plugin and enables the Cypress globals for linting, however if we care about linting all of our JS / TS files the same we are missing all of the rules and plugins from publishing-client/web/.eslintrc.cjs. Granted not all of those rules are applicable since this doesn't use Vue and are no longer using TypeScript here.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: ['plugin:cypress/recommended'],
plugins: ['cypress'],
env: {
'cypress/globals': true,
}
};
3 changes: 3 additions & 0 deletions test/cy/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules

**/screenshots/*
**/videos/*
13 changes: 13 additions & 0 deletions test/cy/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ clean:

rm -rf node_modules

fix:
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}

npm run fix

lint:
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}

npm run lint

# Install dependencies
install:
Expand Down
Loading