-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make restricted syntax messages more helpful #8
Conversation
}, | ||
{ | ||
selector: 'no-restricted-syntax', | ||
message: 'Buddy you\'ve got problems.', | ||
}, | ||
{ | ||
selector: 'DebuggerStatement', | ||
message: 'You may think you need this, but you don\'t. Set your devenv up correctly, chump.', | ||
message: 'Manual debugger statements are not allowed, consider using the breakpoint system in your development environment.', |
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.
I think we could remove this once since it's covered by no-debugger. Also I'm not entirely against the use of debugger in development as long as it's removed from production or staging builds. Just like console.log()
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.
maybe make that specific one a warning with the message to ensure that they are removed for the production build?
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.
so.. problem here is that we cannot degrade no-restricted-syntax to a warning. In any sort of webpack HMR dev environment with eslint-loader
(like our nextjs projects), this will break the dev server until it's fixed, which is not great if we want to allow debugger in development mode.
I feel like this deserves a bigger breakdown on the pros and cons of debugger and our stance on it in our style guide, That discussion is not for this PR, though. I'll probably write something up on it in either an issue or PR that revises the no-debugger
rule.
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.
looks restricted to me!
🎉 This PR is included in version @fuelrats/eslint-config-v1.0.0-canary.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.