space-before-function-paren not working
See original GitHub issuebased on steps provided, I have configured prettier-standard but when I do git add space-before-function-paren eslint rule seems not working:
Source:
function a () { if (true) { } }
After Git Add:
function a() { if (true) { } }
It is removing the space before function parentheses. I have also tried to put the same in .eslintrc but then also it is not working.
{ "rules": { "object-curly-spacing": ["error", "always"], "space-before-function-paren": ["error", { "anonymous": "always", "named": "always", "asyncArrow": "always" }] } }
Can you please guide me how to enable this feature. Please find below software stack:
“prettier”: “1.2.2”, “prettier-standard”: “4.1.0”
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
VS Code - space before function parentheses - Stack Overflow
In VS Code open File -> Preferences -> Settings; Add to your JSON config: "javascript.format.insertSpaceBeforeFunctionParenthesis": true.
Read more >space-before-function-paren - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Unable to add a space before function parens #494 - GitHub
Default behavior for ESLint is to add a space before function parens. This is also a defined rule with StandardJS.
Read more >Rule: space-before-function-paren - Palantir Open Source
One argument which is an object which may contain the keys anonymous , named , and asyncArrow These should be set to either...
Read more >space-before-function-paren - TypeScript ESLint
space -before-function-paren ... We strongly recommend you do not use this rule or any other formatting linter rules. Use a separate dedicated formatter...
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
@Gryff @simply-innovative Could you try 5.1.0?
Also, please note that .eslintrc might be interfering in proper formatting, as prettier-standard allows for customizing its behavior
there are few but .editorconfig doesn’t seem one of them: http://eslint.org/docs/user-guide/configuring#configuration-file-formats