Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
Uses ESLint jquery environment
Browse files Browse the repository at this point in the history
  • Loading branch information
masakura committed Aug 4, 2015
1 parent 53d1e29 commit 8c3d6f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ module.exports = generators.Base.extend({
{
includeSass: this.includeSass,
includeModernizr: this.includeModernizr,
includeJQuery: this.includeBootstrap || this.includeJQuery,
testFramework: this.options['test-framework'],
useBabel: this.options['babel']
}
Expand Down
3 changes: 2 additions & 1 deletion app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"eslintConfig": {
"env": {
"node": true,
"browser": true<% if (testFramework === 'mocha') { %>,
"browser": true<% if (includeJQuery) { %>,
"jquery": true<% } if (testFramework === 'mocha') { %>,
"mocha": true<% } else if (testFramework === 'jasmine') { %>,
"jasmine": true<% } %>
},
Expand Down
8 changes: 8 additions & 0 deletions test/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ describe('jquery', function () {
it('adds the bower dependency', function () {
assert.fileContent('bower.json', '"jquery"');
});

it('uses the eslint environment', function () {
assert.fileContent('package.json', '"jquery"');
});
});

describe('off', function () {
Expand All @@ -36,5 +40,9 @@ describe('jquery', function () {
it('doesn\'t add the bower dependency', function () {
assert.noFileContent('bower.json', '"jquery"');
});

it('doesn\'nt uses the ESLint environment', function () {
assert.noFileContent('package.json', '"jquery"');
});
});
});

0 comments on commit 8c3d6f5

Please sign in to comment.