Skip to content

Comments

make eslint config env agnostic#4

Open
JoshCoady wants to merge 1 commit intomainfrom
remove-babel
Open

make eslint config env agnostic#4
JoshCoady wants to merge 1 commit intomainfrom
remove-babel

Conversation

@JoshCoady
Copy link

If I understand correctly, the babel parser should only be used if you are using babel, which makes this a little problematic for node projects.

Maybe there should be extensions that are for a targeted env or purpose?

If I understand correctly, the babel parser should only be used if you are using babel, which makes this a little problematic for node projects.

Maybe there should be extensions that are for a targeted env or purpose?
@JoshCoady JoshCoady requested a review from paulmelero October 29, 2021 19:58
@paulmelero
Copy link
Contributor

Agreed. If you're not compiling your JS, it's not needed. I'll extend this PR to include the parser in the Vue flavor, which is inherited in the Nuxt flavor.

Thanks, Josh, and sorry for the inconveniences 🙏🏽

@JoshCoady
Copy link
Author

no worries, I just had to look up what the default parser is to set it back as a temp workaround :)

parser: 'espree',

@paulmelero
Copy link
Contributor

First time I hear about it! https://github.com/eslint/espree

@JoshCoady
Copy link
Author

I learned about it when I was looking for a way to reset the parser option back to the default (tried null, false, empty string, and 'default' but those were all just ignored)

They dont document that you can set it to 'espree', but I noticed the following and gave it a shot :)

https://eslint.org/docs/user-guide/configuring/plugins#specifying-parser

By default, ESLint uses Espree as its parser.

Copy link
Contributor

@paulmelero paulmelero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants