Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Added jshint
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Jul 8, 2013
1 parent 546a486 commit 2e7daaf
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"maxdepth": 2,
"maxcomplexity": 10,
"globals": {
"angular": false
}
}
13 changes: 12 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
var path = require('path');

grunt.initConfig({
karma: {
Expand All @@ -16,6 +15,16 @@ module.exports = function (grunt) {
singleRun: true
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'angular-moment.js',
'tests.js'
]
},
ngmin: {
dist: {
files: [
Expand All @@ -36,11 +45,13 @@ module.exports = function (grunt) {
});

grunt.registerTask('test', [
'jshint',
'karma'
]);

grunt.registerTask('build', [
'ngmin',
'jshint',
'uglify'
]);

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"matchdep": "~0.1.1",
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-jshint": "~0.6.0",
"grunt-karma": "~0.5.0",
"grunt-ngmin": "~0.0.2",
"karma": "~0.9.4",
Expand All @@ -15,6 +16,6 @@
"node": ">=0.8.0"
},
"scripts": {
"test": "./node_modules/.bin/karma start"
"test": "./node_modules/.bin/grunt test"
}
}
2 changes: 2 additions & 0 deletions tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Copyright (C) 2013, Uri Shaked.
*/

/* global describe, inject, module, beforeEach, it, expect, waitsFor, runs */

'use strict';

describe('Directive: am-time-ago', function () {
Expand Down

0 comments on commit 2e7daaf

Please sign in to comment.