Skip to content

Commit

Permalink
Merge pull request #6 from fyockm/master
Browse files Browse the repository at this point in the history
respect legacy option
  • Loading branch information
jonschlinkert committed Feb 12, 2014
2 parents 077db8c + 8f8de55 commit 6a50886
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
tmp
*.sublime-*

test
.DS_Store
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
},
"dependencies": {
"chalk": "~0.3.0",
"fixmyjs": "~0.13.1"
"fixmyjs": "~0.13.1",
"jshint": "~2.3.0"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-jshint": "~0.7.2",
"grunt-contrib-nodeunit": "~0.2.2",
"jshint": "~2.3.0",
"time-grunt": "~0.2.2"
},
"keywords": [
Expand Down
5 changes: 5 additions & 0 deletions tasks/fixmyjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ module.exports = function(grunt) {

var fixJavaScript = function(source, options) {
try {
if (options.legacy) {
var jshint = require('jshint').JSHINT;
jshint(source, options);
return fixmyjs(jshint.data(), source, options).run();
}
return fixmyjs.fix(source, options);
} catch (e) {
grunt.log.error(e);
Expand Down

0 comments on commit 6a50886

Please sign in to comment.