Navigation Menu

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

Linter is not producing warnings #114

Closed
zeke opened this issue Jul 24, 2016 · 3 comments
Closed

Linter is not producing warnings #114

zeke opened this issue Jul 24, 2016 · 3 comments
Labels

Comments

@zeke
Copy link

zeke commented Jul 24, 2016

Given the following:

const standard = require('.').linter({eslint: require('eslint')})
standard.lintText('var a = 1;', function(err, res) { console.dir(res) })

I would expect to see something about an unneeded semicolon, but instead the result is:

{ results: 
   [ { filePath: '<text>',
       messages: [],
       errorCount: 0,
       warningCount: 0 } ],
  errorCount: 0,
  warningCount: 0 }

Am I doing it wrong?

@zeke
Copy link
Author

zeke commented Jul 24, 2016

Am I doing it wrong?

Yes. I was.

Turns out all I needed was standard, not standard-engine:

require('standard').lintText('var a = 1;', function(err, res) { console.dir(res) })

@feross
Copy link
Member

feross commented Jul 25, 2016

Yep, sorry if this was confusing. standard-engine is more generic. Meant for people to create their own standard-like modules. This core is shared by standard and semistandard, for example.

@zeke
Copy link
Author

zeke commented Jul 25, 2016

Yeah I should have RTFM. I saw the name standard-engine and made some quick assumptions. Happy that vanilla standard works for me! I made this: https://github.com/zeke/standard-markdown

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

No branches or pull requests

3 participants