You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add json and css to lint-staged in template README (facebook#2671)
* Add json and css to lint-staged in template README
This changes the proposed way about using prettier inside the README.md, because prettier supports css since the 1.4.0 release and json since the 1.5.0 release.
Was not sure if it was a good idea to add different regexes for json and css inside the README.md don't have a real opinion about it myself, could maybe easier for starters to do so if they wan't to add things like eslint or stylelint the the commit hooks.
* Use capitalization for Javascript, CSS and JSON
* Change 'Javascript to JavaScript'
Copy file name to clipboardexpand all lines: packages/react-scripts/template/README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -271,7 +271,7 @@ Start your app by running `npm start`, and start debugging in VS Code by pressin
271
271
272
272
## Formatting Code Automatically
273
273
274
-
Prettier is an opinionated JavaScript formatter. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/).
274
+
Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/).
275
275
276
276
To format our code whenever we make a commit in git, we need to install the following dependencies:
277
277
@@ -307,7 +307,7 @@ Next we add a 'lint-staged' field to the `package.json`, for example:
307
307
// ...
308
308
},
309
309
+ "lint-staged": {
310
-
+ "src/**/*.{js,jsx}": [
310
+
+ "src/**/*.{js,jsx,json,css}": [
311
311
+ "prettier --single-quote --write",
312
312
+ "git add"
313
313
+ ]
@@ -2094,7 +2094,7 @@ There are also reports that *uninstalling* Watchman fixes the issue. So if nothi
2094
2094
2095
2095
### `npm run build` exits too early
2096
2096
2097
-
It is reported that `npm run build` can fail on machines with limited memory and no swap space, which is common in cloud environments. Evenwith small projects this command can increase RAM usage in your system by hundreds of megabytes, so if you have less than 1GBof available memory your build is likely to fail with the following message:
2097
+
It is reported that `npm run build` can fail on machines with limited memory and no swap space, which is common in cloud environments. Evenwith small projects this command can increase RAM usage in your system by hundreds of megabytes, so if you have less than 1GBof available memory your build is likely to fail with the following message:
2098
2098
2099
2099
> The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
0 commit comments