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 Mar 4, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ In order to test a logged in user, you must make an entry in your `/etc/hosts` f
18
18
## NPM Commands
19
19
- To run locally: `npm run dev` and head to `local.topcoder-dev.com:3000/my-dashboard`
20
20
- To create the build: `npm run build`
21
+
- To run code linting: `npm run lint`
21
22
- To run the tests: `npm test`
22
23
23
24
## Recommended Developer Tools
@@ -47,15 +48,16 @@ JavaScript linting
47
48
- For new projects, you can create a local `.eslintrc.json` file by running `eslint --init`
48
49
-**Note:** If you're using ES6, make sure you add `"modules": true` to `"ecmaFeatures"` and `"node": true` to `"env"` in your `.eslintrc.json` file
49
50
-**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`
51
51
52
52
Automatic JavaScript linting in Sublime Text
53
53
- Install [SublimeLinter](http://sublimelinter.readthedocs.org/en/latest/installation.html) following the instructions under "Installing via Package Control"
54
54
- Install [SublimeLinter-eslint](https://github.com/roadhump/SublimeLinter-eslint) with the package manager. The package is called `SublimeLinter-contrib-eslint`
55
55
56
56
### Testing
57
57
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.
59
61
60
62
### Description of Files and Folders
61
63
@@ -73,11 +75,6 @@ Services live in their own folder. All services are part of the tc.services modu
73
75
- Scripts
74
76
- This folder contains our analytics, e.g. Google, New Relic, etc.
75
77
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
-
81
78
## UI-Router and States
82
79
See any `*.routes.js` file as an example.
83
80
@@ -87,8 +84,8 @@ See any `*.routes.js` file as an example.
87
84
88
85
### Style Guide and Naming Conventions
89
86
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
90
88
- Please use ES2015 syntax whenever possible
91
-
- Do not use semicolons
92
89
- Use the Angular style guide mentioned below
93
90
94
91
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