Re-formatting the code
See original GitHub issue// directory
.git/
assets/
javascripts/
stylesheets/
package.json
// package.json
{
"scripts": {
"lint": "lint-staged",
},
"lint-staged": {
"gitDir": "../",
"linters": {
"*.{js,jsx}": ["eslint --fix", "git add"],,
}
},
}
// .git/hooks/pre-commit
cd assets
npm run lint
My setting is like ↑.
With this setting it will be “Error: fatal: Not a git repository: ‘.git’”.
Issue Analytics
- State:
- Created 7 years ago
- Comments:28 (20 by maintainers)
Top Results From Across the Web
Reformat and rearrange code - AppCode - JetBrains
AppCode lets you reformat your code according to the requirements you've specified in your current code style scheme.
Read more >What is the difference between Reformat Code and ...
Rearrange code just does the 1st point, arranges it according to android code style guidelines. Reformat code does both 1st and 2nd point....
Read more >Formatting Code - Eclipse
Instructions on how to complete a procedure. To format your whole script: Open the required file. Go to Source | Format Document or...
Read more >Prettier · Opinionated Code Formatter
Why? · Your code is formatted on save · No need to discuss style in code review · Saves you time and energy...
Read more >Code Formatting and Code Comments - A Beginner's Guide to ...
Essential Parts of Code Formatting · Indentation · White space · Capitalization and naming conventions · Style and spelling of functions, variables ...
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
Released as v3.2.3! Please test and let me know if it works for you.
Thanks for reporting!
Awesome. I will test it after HolyJS 😃