Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ESLint configuration found. #183

Closed
GaryB432 opened this issue Mar 22, 2017 · 6 comments
Closed

No ESLint configuration found. #183

GaryB432 opened this issue Mar 22, 2017 · 6 comments
Assignees
Labels

Comments

@GaryB432
Copy link

GaryB432 commented Mar 22, 2017

I generated my generator and added a single file karma-conf.js right after dummyfile.txt. Now when I run npm test I get the error mentioned in the subject. A Typescript developer, I indeed do not have any ESLint configurations anywhere on my computer. Does the generator-generator generate a generator with like a peer dependency on that? Or what might I be doing wrong?

test/app.js

...
    assert.file([
      'dummyfile.txt',
      'karma-conf.js'
    ]);
...

generators/app/index.js

...
  writing: function () {
    this.fs.copy(
      this.templatePath('dummyfile.txt'),
      this.destinationPath('dummyfile.txt')
    );
    this.fs.copy(
      this.templatePath('karma-conf.js'),
      this.destinationPath('karma-conf-js')
    );
  },
...

versions

+-- chalk@1.1.3
+-- eslint@3.18.0
+-- eslint-config-xo-space@0.15.0
+-- gulp@3.9.1
+-- gulp-coveralls@0.1.4
+-- gulp-eslint@3.0.1
+-- gulp-exclude-gitignore@1.1.1
+-- gulp-istanbul@1.1.1
+-- gulp-line-ending-corrector@1.0.1
+-- gulp-mocha@3.0.1
+-- gulp-nsp@2.4.2
+-- gulp-plumber@1.1.0
+-- yeoman-assert@2.2.3
+-- yeoman-generator@1.1.1
+-- yeoman-test@1.6.0
`-- yosay@1.2.1

Thanks for checking!

@mischah mischah self-assigned this Mar 22, 2017
@mischah mischah added the bug label Mar 22, 2017
@mischah
Copy link
Member

mischah commented Mar 22, 2017

It’s a regression caused by updating gulp-eslint with 2617144 which also causes failing builds on travis.

The issue is discussed over here: adametry/gulp-eslint#186

I’m going to investigate 🏃

@mischah mischah removed their assignment Mar 22, 2017
@mischah
Copy link
Member

mischah commented Mar 22, 2017

@SBoudrias I fixed the issue regarding the code base of generator-generator by tweaking the gulpfile.js. See #184.

But I can’t fix the issue in the generated gulpfile.js which causes the trouble in the generated generator since the file is provided by generator-node. Because gulp is gone since yeoman/generator-node@0c28bcb

Any chance to release generator-node v2 anytime soon?

@GaryB432 You can fix that in your generated generator by replacing:

.pipe(eslint())

with:

.pipe(eslint({baseConfig: {extends: 'eslint:recommended'}}))

in the generated gulpfile.js

@GaryB432
Copy link
Author

Thanks.. we're making some progress.. Now my template js is violating no-undef with 'require' is not defined. and others. What's the trick for defining that? I guess I don't really want to disable that rule. Sorry for bothering your issues list with ESLint noob questions.

@SBoudrias
Copy link
Member

@GaryB432 Try setting env: {node: true}

@mischah
Copy link
Member

mischah commented Mar 24, 2017

I’m going to fix that now that we have generator-node v2.0.0 :octocat:

@mischah mischah self-assigned this Mar 24, 2017
@GaryB432
Copy link
Author

Looking forward to studying that commit so I can learn about the dependency on generator-node. Generators are cool. 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants