Skip to content

Commit

Permalink
added node files to grunt linting and npm pretest linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-goodwin committed Mar 16, 2016
1 parent 0ef27bc commit 64793ff
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
td/public/libs/
td.tests/
3 changes: 3 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"node": true
}
8 changes: 6 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ module.exports = function (grunt) {
pkg: grunt.file.readJSON('package.json'),

jshint: {
files: {
src: ['td/public/app/*.js', 'td/public/app/**/*.js']
options: {
jshintrc: true,
ignores: ['td.test/', 'td/public/libs/']
},
files: {
src: ['td']
}
},

karma: {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": false,
"scripts": {
"start": "node server.js",
"pretest": "node ./node_modules/jshint/bin/jshint td",
"test": "./node_modules/.bin/karma start --single-run --browsers Firefox,PhantomJS",
"citest": "./node_modules/.bin/karma start --single-run false --browsers PhantomJS",
"codecov": "cat './coverage/*/lcov.info' | codecov"
Expand Down Expand Up @@ -50,6 +51,7 @@
"jasmine": "^2.3.2",
"jasmine-core": "^2.3.4",
"jasmine-spec-reporter": "^2.4.0",
"jshint": "^2.9.1",
"karma": "^0.13.15",
"karma-chrome-launcher": "^0.2.1",
"karma-coverage": "^0.5.3",
Expand All @@ -61,6 +63,7 @@
"karma-requirejs": "^0.2.2",
"karma-spec-reporter": "0.0.24",
"karma-xml-reporter": "^0.1.4",
"mockery": "^1.4.1",
"phantomjs-prebuilt": "^2.1.5",
"requirejs": "^2.1.20"
}
Expand Down
2 changes: 1 addition & 1 deletion td/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var AzureTablesStore = require('connect-azuretables')(session);
var app = express();

//security headers
app.set('x-powered-by', false)
app.set('x-powered-by', false);
var ninetyDaysInMilliseconds = 7776000000;
app.use(helmet.hsts({ maxAge: ninetyDaysInMilliseconds }));
app.use(helmet.frameguard('deny'));
Expand Down
4 changes: 4 additions & 0 deletions td/public/app/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"jquery": true,
"browser": true
}

0 comments on commit 64793ff

Please sign in to comment.