-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
Changes: - Update jshint task in `Gruntfile.js` to include `serverTest` - Add `server/.jshintrc-spec` that extends `server/.jshintrc` with spec globals - Use `"latedef": "nofunc"` instead of `"latedef": true` in `server/.jshintrc` - Add assertion for `jshint` task in generator tests for `defaultOptions` - Fix pre exsisting lint errors in `server` and `client` - Change `getEmail()` in `client/app/account/settings/settings.controller` to use `user` arg and not `$scope.user` Closes #463, #486
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,16 @@ module.exports = function (grunt) { | |
options: { | ||
jshintrc: 'server/.jshintrc' | ||
}, | ||
src: [ 'server/{,*/}*.js'] | ||
src: [ | ||
'server/**/*.js', | ||
'!server/**/*.spec.js' | ||
] | ||
}, | ||
serverTest: { | ||
options: { | ||
jshintrc: 'server/.jshintrc-spec' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
villesau
|
||
}, | ||
src: ['server/**/*.spec.js'] | ||
}, | ||
all: [ | ||
'<%%= yeoman.client %>/{app,components}/**/*.js', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": ".jshintrc", | ||
"globals": { | ||
"describe": true, | ||
"it": true, | ||
"before": true, | ||
"beforeEach": true, | ||
"after": true, | ||
"afterEach": true | ||
} | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
villesau
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ describe('GET /api/things', function() { | |
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
@villesau this is where we use the
.jshintrc-spec
file. It was made for use with thejshint:serverTest
task. Feel free to rename if you'd like to use it with another build system.