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 test override #281

Merged
merged 5 commits into from
Aug 12, 2021
Merged

Add test override #281

merged 5 commits into from
Aug 12, 2021

Conversation

keisha-rw
Copy link
Contributor

@keisha-rw keisha-rw commented Aug 11, 2021

This PR adds in an override rule for test files as well as updates the deprecated CLIEngine to use the ESLint constructor instead.

Here's more info on CLIEngine's deprecation: https://eslint.org/docs/user-guide/migrating-to-7.0.0#the-cliengine-class-has-been-deprecated

@tclindner Let me know if you have any issues with this! Or if I totally screwed things up. 🙈

package.json Outdated
@@ -32,7 +32,7 @@
"eslint": "eslint . --format=node_modules/eslint-formatter-pretty",
"lint": "npm run npmpackagejsonlint && npm run eslint",
"npmpackagejsonlint": "npmPkgJsonLint .",
"test": "jest"
"test": "jest --testPathIgnorePatterns=test/exampleFiles/testFileWithMultipleComponents.test.js"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@keisha-rw why are we creating this file if we are just going to ignore it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a silly example file to test that my override rule is working. It's not an actual test file. Because my override rule is based on file extensions, I needed to test it by creating a file: https://github.com/tclindner/eslint-config-vue-tc/pull/281/files#diff-ad8f8c8d60c5b21dfb74080c0cd71bd974fa74f9b655766133728845311bbce1R9. My tests validate that non-test files (that don't end in .test.js) still hit a lint error for this rule, but test files do not.

@tclindner
Copy link
Owner

Thank you for doing this, @keisha-rw

@tclindner
Copy link
Owner

Thank you for doing this, @keisha-rw

@keisha-rw would you mind looking at the lint failure? Thanks!
image

@tclindner tclindner enabled auto-merge (squash) August 12, 2021 15:51
auto-merge was automatically disabled August 12, 2021 17:11

Head branch was pushed to by a user without write access

@keisha-rw
Copy link
Contributor Author

Thank you for doing this, @keisha-rw

@keisha-rw would you mind looking at the lint failure? Thanks!
image

Oh, the irony of running into lint issues while updating a lint repo. 🤦‍♀️ Should be all fixed up now!

@tclindner tclindner enabled auto-merge (squash) August 12, 2021 18:57
@tclindner tclindner merged commit 4b92332 into tclindner:master Aug 12, 2021
@keisha-rw keisha-rw deleted the add-test-override branch August 12, 2021 20:55
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

3 participants