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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to disable "titleMustBeString" in valid-title rule #470

Closed
mrtnzlml opened this issue Nov 8, 2019 · 1 comment
Closed

Ability to disable "titleMustBeString" in valid-title rule #470

mrtnzlml opened this issue Nov 8, 2019 · 1 comment

Comments

@mrtnzlml
Copy link
Contributor

mrtnzlml commented Nov 8, 2019

Hello! :)

We really like valid-title rule; however, it got too opinionated in latest releases without possibility to configure it (so we had to disable it altogether 馃槩). More specifically we would need to disable just the titleMustBeString part because we sometimes generate the tests dynamically like here: https://github.com/adeira/universe/blob/e6489c667dbed90273d9e7feb3bf494e9fb33241/src/monorepo-scanner/src/scans/WorkspacesDependencies.scan.js#L45

Would you please consider making it configurable? Thank you very much! :)

mrtnzlml pushed a commit to adeira/universe that referenced this issue Nov 8, 2019
@G-Rath
Copy link
Collaborator

G-Rath commented Nov 8, 2019

@mrtnzlml thanks for raising this issue!

It's actually already possible for describe via ignoreTypeOfDescribeName.

However, that's about as far as we can go as any further would require us to implement effectively a static analyzer, as we'd have to track variables & identifiers all over the codebase we're linting to determine their type compatibility. (Our previous discussion about this happened here)

However, you can simply wrap your variable in template strings, like so: `${packageJSONLocation}`

This is actually a good idea to do anyway, b/c it & test only support strings - they'll error if you give them anything else, including numbers. So by wrapping in a template literal, you're ensuring toString will always be called :)

@G-Rath G-Rath closed this as completed Nov 8, 2019
mrtnzlml pushed a commit to adeira/universe that referenced this issue Nov 8, 2019
dependabot-preview bot added a commit to adeira/universe that referenced this issue Nov 8, 2019
mrtnzlml pushed a commit to adeira/eslint-config-adeira that referenced this issue Oct 27, 2020
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 22.21.0 to 23.0.2.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v22.21.0...v23.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

See: jest-community/eslint-plugin-jest#470

adeira-source-id: e69d3c0763df845bd26f4b960be8461ed5c2c8e5
mrtnzlml added a commit to adeira/eslint-config-adeira that referenced this issue Oct 27, 2020
See: jest-community/eslint-plugin-jest#470 (comment)

adeira-source-id: 594a91ef3798662ca61379abbba0ef7b6d04117b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants