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

[eslint] Clean up eslint and babel-eslint #227

Merged
merged 1 commit into from
May 25, 2017
Merged

[eslint] Clean up eslint and babel-eslint #227

merged 1 commit into from
May 25, 2017

Conversation

fkling
Copy link
Owner

@fkling fkling commented May 17, 2017

The eslint setup in astexplorer is a bit chaotic. I'm not sure if it's worth investing a lot of time to clean this up in the light of #197 (which I will hopefully finish some day 😛 ), so I just did some minimal changes:

  • Switch the default parser for eslint2 and eslint3 to babel-eslint, because that's what eslintUtils uses.
  • Enable sourceType: 'module' in eslintUtils.
  • Make the babel-eslint parser actually refer to babel-eslint and not acorn-to-esprima.
  • Since acorn-to-esprima is deprecated, hide in from the menu.

In order to really clean this up, eslint1 would have to use an older version of babel-eslint that uses acorn-to-esprima, but I didn't want to spend more time with this.

@hzoo , does this look good?

cc @kentcdodds (follow up to #219 )

@hzoo
Copy link
Collaborator

hzoo commented May 17, 2017

I think it'd be ok to drop eslint1 anyway since there's an v4 coming out? Sounds fine

@kentcdodds
Copy link
Contributor

Honestly I don't see much reason to keep anything but the latest version 🤷‍♂️

@fkling
Copy link
Owner Author

fkling commented May 17, 2017

@kentcdodds Are you saying all my efforts in #197 are for nothing? 😛 jk

Honestly I don't see much reason to keep anything but the latest version

One reason is to be able to load snippets that were created with an older version of a tool or parser.

I think it'd be ok to drop eslint1 anyway since there's an v4 coming out?

I thought the same, however, google analytics says that there is still traffic for eslint1 (last 30 days):

screen shot 2017-05-17 at 7 54 46 am

And I believe these are really instances where eslint1 is selected, not just loaded for an existing snippet (but I have to check the code for that 😉 ).

However, in general I think we should only expose the latest version of a tool, but make it still loadable if needed, just like in this case for acorn-to-esprima. We kind of get that with #197 anyway.

@fkling
Copy link
Owner Author

fkling commented May 19, 2017

so, good to go? 😃

@fkling fkling merged commit 95c53e5 into master May 25, 2017
@fkling fkling added the deploy pending Marks issues/PRs that are merged into master but are not deployed to any webserver label May 25, 2017
@fkling fkling deleted the eslint branch May 25, 2017 03:00
@fkling fkling added deployed to production Marks issues/PRs that are deployed to https://astexplorer.net and removed deploy pending Marks issues/PRs that are merged into master but are not deployed to any webserver labels May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed to production Marks issues/PRs that are deployed to https://astexplorer.net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants