-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat: add ability to show rule for JSX usage #15
Conversation
Adds the ability to show a rule violation when deprecated methods are used in JSX fix gund#8
Hey @gund, any thoughts on how you'd approach the code complexity problem Code Climate picked up on in this PR? |
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.
Hi, thanks a lot for your contribution!
I just have a few questions before we can merge this.
Also it's important to add test cases for the JSX functionality to verify they are working correctly. |
moves the internal rule creator method later and gives it a better name
I've moved that method and it looks better :) |
Changing the
I'd have thought adding |
I've pushed a commit with my attempt at adding JSX support to the tests. Let me know if you have any thoughts on how to fix them :) (I'm very unfamiliar with ESLint rule development and testing) |
Unfortunately I've also hit the same error with JSX tests and have no idea how to fix them... Maybe we could ping somebody from the ESLint team to give us a hint here. |
I've tried upgrading the |
There is a dummy file called |
Good find! Thanks! 🙏 |
adds jsx test capability with base component usage tests
Code Climate has analyzed commit 0704bd3 and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
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.
Nice! LGTM
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…xample file ```text Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. The file does not match your project config: eg\show-paths.esm.mjs. The extension for the file (.mjs) is non-standard. You should add "parserOptions.extraFileExtensions" to your config. ``` - may have happened on earlier commits (look...) - ref: <https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-use-a-framework-like-vue-that-requires-custom-file-extensions-and-i-get-errors-like-you-should-add-parseroptionsextrafileextensions-to-your-config> - ref: <typescript-eslint/typescript-eslint#2850> - ref: <gund/eslint-plugin-deprecation#15>
…xample file ```text Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. The file does not match your project config: eg\show-paths.esm.mjs. The extension for the file (.mjs) is non-standard. You should add "parserOptions.extraFileExtensions" to your config. ``` - may have happened on earlier commits (look...) - ref: <https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-use-a-framework-like-vue-that-requires-custom-file-extensions-and-i-get-errors-like-you-should-add-parseroptionsextrafileextensions-to-your-config> - ref: <typescript-eslint/typescript-eslint#2850> - ref: <gund/eslint-plugin-deprecation#15>
Adds the ability to show a rule violation when deprecated methods are used in JSX.
I also had to extract the
Identifier
method into a method so it could also be passed toJSXIdentifier
fix #8