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

Standard + Legacy Decorators #1340

Closed
mattdesl opened this issue Jul 27, 2019 · 3 comments
Closed

Standard + Legacy Decorators #1340

mattdesl opened this issue Jul 27, 2019 · 3 comments

Comments

@mattdesl
Copy link

mattdesl commented Jul 27, 2019

What version of standard?

12.0.1

What operating system, Node.js, and npm version?

node 8.10.0, npm 6.1.0

What did you expect to happen?

I would expect there to be a way to use legacy decorators with standard and babel-eslint parser. I already have this in my package.json:

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

What actually happened?

I cannot find a way to configure the babel-eslint parser to accept legacy decorator syntax. Is such a thing possible with standard?

@mattdesl
Copy link
Author

mattdesl commented Jul 27, 2019

For now I've published this plugin:

https://github.com/mattdesl/eslint-plugin-legacy-decorators

Usage after installing it + babel-eslint:

  // ... in package.json ...
  "semistandard": {
    "parser": "babel-eslint",
    "plugins": ["legacy-decorators"]
  }

EDIT: Nevermind, I thought this would work but it doesn't. 😢 I think standard needs to explicitly pass parserOptions to the eslint CLI engine. Maybe this could be added in standard's configuration?

@feross
Copy link
Member

feross commented Jul 28, 2019

Perhaps you can use standardx for this? Or use eslint directly?

@no-response
Copy link

no-response bot commented Aug 4, 2019

This issue has been automatically closed because there was no response to a request for more information from the issue opener. Please leave a comment or open a new issue if you have additional information related to this issue.

@no-response no-response bot closed this as completed Aug 4, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

2 participants