Skip to content

Commit

Permalink
Fix additional linting errors in generated generator
Browse files Browse the repository at this point in the history
Needed to set rule object-curly-spacing to `always` because otherwise it would conflict to the prettier setup in the generated generator.
  • Loading branch information
mischah committed Feb 25, 2018
1 parent 98d4a10 commit 87f9e82
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ module.exports = class extends Generator {
}

install() {
this.installDependencies({bower: false});
this.installDependencies({ bower: false });
}
};
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"env": {
"jest": true,
"node": true
},
"rules": {
"object-curly-spacing": ["error", "always"]
}
},
"jest": {
Expand Down
9 changes: 4 additions & 5 deletions subgenerator/templates/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ const helpers = require('yeoman-test');

describe('<%- generatorName %>:<%- name %>', () => {
beforeAll(() => {
return helpers.run(path.join(__dirname, '../generators/<%- name %>'))
.withPrompts({someAnswer: true});
return helpers
.run(path.join(__dirname, '../generators/<%- name %>'))
.withPrompts({ someAnswer: true });
});

it('creates files', () => {
assert.file([
'dummyfile.txt'
]);
assert.file(['dummyfile.txt']);
});
});

0 comments on commit 87f9e82

Please sign in to comment.