https://cypress.io logo
Rules are just plugin cypress
# general-chat
l
Rules are just "plugin:cypress/recommended" the e2e.js file is missing a ; on line 17 and a newline at the end of the file the spec it builds for you as a sample is missing ; at the end of every line, or almost every line line 1 of the cypress.config.js file is using a double quoted string in the require It isn't a showstopper, but kind of annoying to get if you are using the recommended eslint rules
m
Thanks! It looks like these are from templates which are part of the main Cypress product, not the kitchensink. If you think these should be changed then you could open an issue in https://github.com/cypress-io/github-action/issues.
@lemon-holiday-89994 `plugin:cypress/recommended`is not enabled in the kitchensink repo and if it is enabled then it throws errors for several of the example specs. It didn't complain about the issues that you mentioned however. This should be given a detailed look.
l
it's from the boilerplate templates that get created when you do a fresh install of Cypress and first run
m
Understood. It would need to be looked at by somebody with good eslint experience. I looked at https://github.com/cypress-io/eslint-plugin-cypress (which is where the
plugin:cypress/recommended
rules come from which you quoted), but I don't think that is the whole story. Also that repository is saying that it is way behind the community fork, needs to be updated and is supposed to be integrated into the core product, however that is currently delayed.
I did some research and found that the rules, which you say that the standard examples fail, are not part of
"plugin:cypress/recommended"
and each of the files you mentioned pass eslint when running against
"eslint:recommended"
. cypress/support/e2e.js cypress/e2e/spec.cy.js cypress.config.js None of the rules you mentioned are selected by
"eslint:recommended"
. - JavaScript semicolon at the end-of-line is **semi**: https://eslint.org/docs/latest/rules/semi - newline at the end-of-file is **eol-last**: https://eslint.org/docs/latest/rules/eol-last - double quoted string is **quotes**: https://eslint.org/docs/latest/rules/quotes Thank you for raising this topic, as I realized that we have a problem in a related area. As far as I can see though the default files are fine if
"eslint:recommended"
is the reference rule set. Of course you or your organization is free to set different rules and you might need to modify the standard files accordingly.
l
it may be that the project has other rules that are more restrictive. I appreciate you looking. I haven't had time to just create an empty project with no other rules in place
6 Views