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

Any way to use babel-eslint here? #106

Closed
ColCh opened this issue Apr 7, 2015 · 19 comments

Comments

@ColCh
Copy link

commented Apr 7, 2015

Nice project! How we can use babel-eslint?

@ColCh ColCh changed the title Any way to utilize babel-eslint here? Any way to use babel-eslint here? Apr 7, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Apr 8, 2015

There's no way to use a custom parser with standard, sorry. I might reconsider if there's significant demand, but it's not likely.

@feross feross closed this Apr 8, 2015

@bendrucker

This comment has been minimized.

Copy link

commented Apr 17, 2015

I'm interested in this as well

@julien-f

This comment has been minimized.

Copy link

commented Apr 27, 2015

I am currently using some ES7 features (such as await/async) which are not currently supported by ESPree.

It is annoying because these parse failures (unexpected token) break ESLint and prevent the detection of potential errors.

I am not sure what would be the best way to tackle this issue without breaking the various editor plugins that integrate standard.

@yoshuawuyts

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2015

@julien-f If Espree can't parse a token it will break, there's little that can be done about that.

I think the solution is to make sure Espree can parse all tokens; you could either make it parse the build output (yuck) or help Espree forward by creating an issue and / or a PR to add async / await support.

edit: derp, derp or option 3 is to find a way to add what OP suggested to standard. Not sure if that's necessarily the correct solution, but it probably fixes your issues so it's valid.

@julien-f

This comment has been minimized.

Copy link

commented May 12, 2015

Extracting the core (#87) and the EsLint config (#132) would also helps in creating a fork using babel-eslint.

@feross feross reopened this May 13, 2015

@feross

This comment has been minimized.

Copy link
Member

commented May 13, 2015

Re-opening for discussion.

@julien-f

This comment has been minimized.

Copy link

commented May 13, 2015

I created babel-standard based on eslint-standard-config and babel-eslint.

@feross I added you as a collaborator (and @sebmck, Babel creator), feel free to play with it.

@feross

This comment has been minimized.

Copy link
Member

commented May 13, 2015

Is this line the only thing you changed?

@sebmck

This comment has been minimized.

Copy link

commented May 14, 2015

@julien-f Why didn't you just fork this repo so history was retained? Unsure how (or if) you're planning on keeping it in sync.

@bendrucker

This comment has been minimized.

Copy link

commented May 14, 2015

I use a fork (https://github.com/bendrucker/standard/tree/babel) and it's indeed a one liner just to set the parser in ./rc/.eslintrc: master...bendrucker:babel

@julien-f

This comment has been minimized.

Copy link

commented May 14, 2015

@feross Yep.

@sebmck I just put things together for testing, but you're right I should have done so and will fix it.

@ColCh

This comment has been minimized.

Copy link
Author

commented May 14, 2015

@bendrucker may be you want to test npm scopes with your fork?

@bendrucker

This comment has been minimized.

Copy link

commented May 14, 2015

@ColCh Yeah I should have, but at this point you can just use Julien's.

I think it's reasonable to treat parsers as the one case where eslint config can be provided without defeating the purpose of standard. There's really only two (esprima-fb and babel-eslint). Babel's targeting future ES features so this is an ongoing concern.

This is also blocked by eslint as far as I can tell. Parsers are read from the config file and there's no way to provide them via CLIEngine.

@RnbWd

This comment has been minimized.

Copy link

commented May 16, 2015

I got it working today with 'eslint-config-standard' - thank you for that!!

@jladuval

This comment has been minimized.

Copy link

commented May 28, 2015

What's the story around this. I too would love to be able to use async-await. Should I use babel-standard?

@julien-f

This comment has been minimized.

Copy link

commented May 29, 2015

@jladuval You can use babel-standard, if you find some bugs please report them there.

@feross

This comment has been minimized.

Copy link
Member

commented May 29, 2015

The latest version of standard (3.12.0) now supports custom JS parsers!

To use a custom parser, install it from npm (example: npm install babel-eslint) and add this to your package.json:

{
  "standard": {
    "parser": "babel-eslint"
  }
}

That's it. Enjoy!

@chris9753

This comment has been minimized.

Copy link

commented Dec 17, 2015

Using the latest version here with config and I still get unexpected token on '=>'

@vtambourine

This comment has been minimized.

Copy link

commented Mar 4, 2016

I am also experiencing troubles using custom linters in Atom's lint engine. Not sure if it is standard's problem or linter-js-standard's.

@feross feross added the enhancement label May 10, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
10 participants
You can’t perform that action at this time.