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

Make restricted syntax messages more helpful #8

Merged
merged 3 commits into from
Feb 27, 2020

Conversation

SuperManifolds
Copy link
Member

No description provided.

},
{
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.',
Copy link
Member

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()

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?

Copy link
Member

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.

Copy link
Member

@UncleClapton UncleClapton left a 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!

@SuperManifolds SuperManifolds merged commit 4746022 into develop Feb 27, 2020
@github-actions
Copy link

github-actions bot commented Mar 5, 2023

🎉 This PR is included in version @fuelrats/eslint-config-v1.0.0-canary.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants