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
{{ message }}
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
| .eslintignore | Config settings for paths to exclude from linting |
207
209
208
210
## Building the project
209
211
It is rare for JavaScript projects not to have some kind of build pipeline these days, however Node projects typically have the least amount of build configuration.
@@ -271,7 +273,7 @@ Below is a list of all the scripts this template has available:
|`start`| Does the same as 'npm run serve'. Can be invoked with `npm start`|
274
-
|`build`| Full build. Runs ALL build tasks (`build-sass`, `build-ts`, `tslint`, `copy-static-assets`) |
276
+
|`build`| Full build. Runs ALL build tasks (`build-sass`, `build-ts`, `lint`, `copy-static-assets`) |
275
277
|`serve`| Runs node on `dist/server.js` which is the apps entry point |
276
278
|`watch-node`| Runs node with nodemon so the process restarts if it crashes. Used in the main watch task |
277
279
|`watch`| Runs all watch tasks (TypeScript, Sass, Node). Use this if you're not touching static assets. |
@@ -281,7 +283,7 @@ Below is a list of all the scripts this template has available:
281
283
|`watch-ts`| Same as `build-ts` but continuously watches `.ts` files and re-compiles when needed |
282
284
|`build-sass`| Compiles all `.scss` files to `.css` files |
283
285
|`watch-sass`| Same as `build-sass` but continuously watches `.scss` files and re-compiles when needed |
284
-
|`tslint`| Runs TSLint on project files |
286
+
|`lint`| Runs ESLint on project files |
285
287
|`copy-static-assets`| Calls script that copies JS libs, fonts, and images to dist directory |
286
288
|`debug`| Performs a full build and then serves the app in watch mode |
287
289
|`serve-debug`| Runs the app with the --inspect flag |
@@ -461,34 +463,32 @@ Note this will also generate a coverage report.
461
463
Writing tests for web apps has entire books dedicated to it and best practices are strongly influenced by personal style, so I'm deliberately avoiding discussing how or when to write tests in this guide.
462
464
However, if prescriptive guidance on testing is something that you're interested in, [let me know](https://www.surveymonkey.com/r/LN2CV82), I'll do some homework and get back to you.
463
465
464
-
## TSLint
465
-
TSLint is a code linter which mainly helps catch minor code quality and style issues.
466
-
TSLint is very similar to ESLint or JSLint but is built with TypeScript in mind.
466
+
## ESLint
467
+
ESLint is a code linter which mainly helps catch quickly minor code quality and style issues.
467
468
468
-
### TSLint rules
469
-
Like most linters, TSLint has a wide set of configurable rules as well as support for custom rule sets.
470
-
All rules are configured through `tslint.json`.
469
+
### ESLint rules
470
+
Like most linters, ESLint has a wide set of configurable rules as well as support for custom rule sets.
471
+
All rules are configured through `.eslintrc` configuration file.
471
472
In this project, we are using a fairly basic set of rules with no additional custom rules.
472
-
The settings are largely based off the TSLint settings that we use to develop TypeScript itself.
473
473
474
-
### Running TSLint
475
-
Like the rest of our build steps, we use npm scripts to invoke TSLint.
476
-
To run TSLint you can call the main build script or just the TSLint task.
474
+
### Running ESLint
475
+
Like the rest of our build steps, we use npm scripts to invoke ESLint.
476
+
To run ESLint you can call the main build script or just the ESLint task.
477
477
```
478
-
npm run build // runs full build including TSLint
479
-
npm run tslint // runs only TSLint
478
+
npm run build // runs full build including ESLint
479
+
npm run lint // runs only ESLint
480
480
```
481
-
Notice that TSLint is not a part of the main watch task.
482
-
It can be annoying for TSLint to clutter the output window while in the middle of writing a function, so I elected to only run it only during the full build.
483
-
If you are interested in seeing TSLint feedback as soon as possible, I strongly recommend the [TSLint extension in VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin).
481
+
Notice that ESLint is not a part of the main watch task.
482
+
483
+
If you are interested in seeing ESLint feedback as soon as possible, I strongly recommend the [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).
484
484
485
485
### VSCode Extensions
486
486
487
487
To enhance your development experience while working in VSCode we also provide you a list of the suggested extensions for working with this project:
488
488
489
489

0 commit comments