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

Add a "recommended" config to simplify usage #13

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

textbook
Copy link
Contributor

Also make the Rules section of the README a table to track recommended/fixable status.

Meta: When #11 and #12 are merged they should probably be added to the recommended rules as errors; if this PR is merged first I can update the others to use the rule table format and the recommended config.

@poenneby
Copy link
Owner

Hello @textbook - I am not sure how useful an "opinionated" configuration would be at this point. Perhaps when there are so many rules (see eslint) that you have no idea how to get a decent set configured. "Recommended" is also pretty subjective... Perhaps it would be more useful to have a "minimal" rule set (no rules switched on, just keywords) and a "strict" (all rules switched on) ?
Happy to be convinced otherwise 😄

Also make the Rules section of the README a table to track recommended/fixable status.
@textbook
Copy link
Contributor Author

I created the config primarily so you only add to add the plugin once, using extends, rather than needing both plugins and env (which should maybe be codeceptjs/globals, going by other similar packages). My thinking was that "recommended" would turn on the rules that suggest a mistake has been made (interfering with which tests are running can leave you thinking the suite is working when it actually isn't), but leave anything "to taste" out of it.

@poenneby
Copy link
Owner

Ok makes sense. I can see how everyone will go for the recommended configuration.
Personally I would recommend the no-actor-in-scenario rule to encourage using the page-object pattern and thus keeping the test suite maintainable. But perhaps that can be included in a future strict configuration.

@textbook
Copy link
Contributor Author

I thought about that, but even the docs show mixing actor and page object in their examples, and I definitely found that a useful pattern when writing tests, given the high-level selectors things like I.click give you.

@poenneby
Copy link
Owner

poenneby commented Aug 9, 2019

Ok @textbook I can see where you're coming from. The recommended config makes total sense now. While looking at this I came across another idea of providing an all config, the jest plugin does this in a transparent way. But let's get this merged now! 🙂

@poenneby poenneby merged commit 6133fef into poenneby:master Aug 9, 2019
@textbook textbook deleted the recommended branch August 9, 2019 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants