Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit e11063d

Browse files
committed
Update readme for linting
1 parent a4e87be commit e11063d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ In order to test a logged in user, you must make an entry in your `/etc/hosts` f
1818
## NPM Commands
1919
- To run locally: `npm run dev` and head to `local.topcoder-dev.com:3000/my-dashboard`
2020
- To create the build: `npm run build`
21+
- To run code linting: `npm run lint`
2122
- To run the tests: `npm test`
2223

2324
## Recommended Developer Tools
@@ -47,15 +48,16 @@ JavaScript linting
4748
- For new projects, you can create a local `.eslintrc.json` file by running `eslint --init`
4849
- **Note:** If you're using ES6, make sure you add `"modules": true` to `"ecmaFeatures"` and `"node": true` to `"env"` in your `.eslintrc.json` file
4950
- **Note:** If you are using React, make sure you have `eslint` and `eslint-plugin-react` as `devDependencies` in your `package.json` file
50-
- **Optional**: Add `"lint": "eslint ."` to your `package.json` file to run linting at any time via `npm run lint`
5151

5252
Automatic JavaScript linting in Sublime Text
5353
- Install [SublimeLinter](http://sublimelinter.readthedocs.org/en/latest/installation.html) following the instructions under "Installing via Package Control"
5454
- Install [SublimeLinter-eslint](https://github.com/roadhump/SublimeLinter-eslint) with the package manager. The package is called `SublimeLinter-contrib-eslint`
5555

5656
### Testing
5757

58-
To read about the file and folder structure of tests, read [this section](https://github.com/appirio-tech/topcoder-app#tests)
58+
The tests folder contains mock data (`tests/test-helpers/mock-data.js`). To run tests, use `npm test`.
59+
60+
Spec files live alongside the code they are testing. For example, in peer-review you have `review-status.controller.js` and `review-status.spec.js` in the same review-status folder.
5961

6062
### Description of Files and Folders
6163

@@ -73,11 +75,6 @@ Services live in their own folder. All services are part of the tc.services modu
7375
- Scripts
7476
- This folder contains our analytics, e.g. Google, New Relic, etc.
7577

76-
#### tests
77-
The tests folder contains mock data (`tests/test-helpers/mock-data.js`). To run tests, use `npm test`.
78-
79-
Spec files live alongside the code they are testing. For example, in peer-review you have `review-status.controller.js` and `review-status.spec.js` in the same review-status folder.
80-
8178
## UI-Router and States
8279
See any `*.routes.js` file as an example.
8380

@@ -87,8 +84,8 @@ See any `*.routes.js` file as an example.
8784

8885
### Style Guide and Naming Conventions
8986

87+
- Our travis build runs `npm run lint` and `npm test`, so make sure your code adheres to the code style enforced by our linters
9088
- Please use ES2015 syntax whenever possible
91-
- Do not use semicolons
9289
- Use the Angular style guide mentioned below
9390

9491
In general, follow this [AngularJS style guide](https://github.com/johnpapa/angular-styleguide), which covers JavaScript code style, JavaScript variable naming, and file naming conventions. One deviation is in the naming of services, where we follow the same pattern as controllers, e.g. UserService, ProfileService.

0 commit comments

Comments
 (0)