automatically removes debugger statements
See original GitHub issuePrettier automatically removes my debugger statements (not very nice 😛).
Here is a conversation with @kentcdodds https://twitter.com/jasonlaster11/status/890683399974920194
Atom version: 1.18.0
prettier-atom version: 0.37.0
prettier version: 1.5.3
prettier-eslint version: 6.4.2
prettier-atom configuration: {
"formatOnSave": true,
"formatOnSaveOptions": {
"enabled": true,
"excludedGlobs": [
"**/mochitest/**",
"**/assets/**"
],
"respectEslintignore": true,
"showInStatusBar": false,
"javascriptScopes": [
"source.js",
"source.jsx",
"source.js.jsx",
"source.babel",
"source.js-semantic",
"text.html.basic",
"text.html.vue"
],
"typescriptScopes": [
"source.ts",
"source.tsx",
"source.ts.tsx"
],
"cssScopes": [
"source.css",
"source.less",
"source.css.less",
"source.scss",
"source.css.scss"
],
"jsonScopes": [
"source.json"
],
"whitelistedGlobs": [],
"isDisabledIfNotInPackageJson": false
},
"prettierOptions": {
"singleQuote": false,
"bracketSpacing": true,
"semi": true,
"useTabs": false,
"jsxBracketSameLine": false,
"printWidth": 80,
"tabWidth": "auto",
"trailingComma": "none",
"parser": "babylon"
},
"silenceErrors": true,
"useEslint": true,
"useEditorConfig": true,
"prettierEslintOptions": {
"prettierLast": false
}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Automatically Remove System.debug statements from Apex ...
Using sublime text you can use the feature. Find > find in files (CTRL+Shift+F). Activate regular expression by clicking the button .*.
Read more >Is there a way to remove debugger & console.log statements ...
In .Net MVC project I need to remove all the debugger and console.log statements from js files when I do a release build,...
Read more >Remove console and debugger statements for production with ...
Let's make use of our preferred build tool and remove all debug statements before deploying code to production.
Read more >All 'debugger' statements should be removed
In JSLint the warning given is "Unexpected 'debugger'". In JSHint prior to version 1.0.0 the message used is "All 'debugger' statements should be...
Read more >Debugger statements should not be used - SonarSource Rules
The debugger statement can be placed anywhere in procedures to suspend execution. Using the debugger statement is similar to setting a breakpoint in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That would be one way to solve it. The disadvantage is now you can’t use prettier-eslint to auto-fix this in the cases where you actually do want it to fix that. In other words, it seems when you’re using prettier-atom, you probably don’t want to remove the debugger, but if you’re using prettier-eslint in some sort of validate script, you probably do.
In order to get both, you could allow passing an option for prettier-eslint that lets you override eslint rules at the time of invocation? That way you could have debuggers disabled in your eslint config, but prettier-atom could call prettier-eslint and override that rule as we assume it’s okay for development? Then when you run prettier-eslint as part of a
validate
script or whatever, it still removes it for you.I’m going to move this over here: https://github.com/prettier/prettier-eslint/issues/118