-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add test override #281
Conversation
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Thank you for doing this, @keisha-rw |
@keisha-rw would you mind looking at the lint failure? Thanks! |
Head branch was pushed to by a user without write access
Oh, the irony of running into lint issues while updating a lint repo. 🤦♀️ Should be all fixed up now! |
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. 🙈