Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Chore: Remove esprima #13

Merged
merged 1 commit into from
Feb 22, 2017
Merged

Chore: Remove esprima #13

merged 1 commit into from
Feb 22, 2017

Conversation

corbinu
Copy link
Contributor

@corbinu corbinu commented Feb 10, 2017

This builds on #11 and should land after it. It removes esprima and replaces it with espree in all the tests.

It currently fails on two tests that resolve around the use of "with" I am not sure if there is a simple fix or if given that with is not even supported in strict mode if these should simply be removed.

@corbinu corbinu changed the title Remove esprima Chore: Remove esprima Feb 11, 2017
@corbinu
Copy link
Contributor Author

corbinu commented Feb 11, 2017

@nzakas What are your thoughts on the "with" tests?

@soda0289
Copy link
Member

@corbinu Are you referring to the with-scope.js test. Is it failing to parse or failing an assertion?

@corbinu
Copy link
Contributor Author

corbinu commented Feb 11, 2017

@soda0289 Yes and the optimization. espree is returning a parsing error as it says with is not allowed in strict mode. Still shows up even if I tell espree strict mode is off. I am just wondering if it is even worth fixing given that I am pretty sure everybody just wants to see "with" go away.

@soda0289
Copy link
Member

Can you set the sourceType to script. I belive it an option that can be passed into espree

@soda0289
Copy link
Member

Also I think if ecmaVersion is greater than 5 strict mode is set. Checkout the Readme on espree

@corbinu
Copy link
Contributor Author

corbinu commented Feb 11, 2017

The readme lead me to believe all I should have to do is ecmaFeatures.impliedStrict: false

@soda0289
Copy link
Member

Looks like u cannot pass in options into parse since they are predefined in utils/espree.js. You will probably have to update the espree utility to have it understand different options.

@soda0289
Copy link
Member

Im pretty sure If sourceType is module strict is set

@corbinu
Copy link
Contributor Author

corbinu commented Feb 11, 2017

@soda0289 Got figured out thanks

@corbinu
Copy link
Contributor Author

corbinu commented Feb 12, 2017

@JamesHenry should be all set!

@corbinu
Copy link
Contributor Author

corbinu commented Feb 15, 2017

Just checking anything I still need to do here?

@JamesHenry
Copy link
Member

Thanks @corbinu!

I just want to be sure that there are no considerations here, and so I have requested a review from @nzakas.

Please be patient, he is extremely in demand for reviews 😄

@JamesHenry
Copy link
Member

Sorry, @corbinu, this will also now have a number of conflicts after #15 was merged

@corbinu
Copy link
Contributor Author

corbinu commented Feb 16, 2017

@soda0289 Can you take a look at this I seem to have somehow blown up the Makefile (it isn't running the tests and isn't printing lint errors) but I didn't edit the Makefile and only removed esprima from the package.json. I currently have left 2 linting errors in the tests to show that it should be erroring and is not. If I log out the command exced in the make file and run it directly I get the correct results

@soda0289
Copy link
Member

@corbinu I changed the way the tests get run. We now use istanbul to check code coverage. That is run from the node_modules/istanbul directory. Did you run npm install after rebasing? What error do you get when you run node Makefile.js test

@corbinu
Copy link
Contributor Author

corbinu commented Feb 16, 2017

@soda0289 Yes I did a clean npm install. It doesn't error thats the issue it passes silently. Take a look at the latest Travis build https://travis-ci.org/eslint/eslint-scope/jobs/202411080

@soda0289
Copy link
Member

@corbinu That is strange. I will have to look into this more tonight. Maybe the makefile variable TEST_SCRIPT is not evaluating or the globing test/**/*.js is not working. I cannot see anything this pull request does that would mess it up. Do the tests run in master?

@corbinu
Copy link
Contributor Author

corbinu commented Feb 16, 2017

@soda0289 The tests run fine on master. It seams that the silent failing is caused when I create a directory in tests. In this case the "util" directory. When I created that on master it implodes

@soda0289
Copy link
Member

Hmmm it must be the globing then. You can change it to test/*.js that will avoid going into the utils directory

@corbinu
Copy link
Contributor Author

corbinu commented Feb 16, 2017

@soda0289 That did the trick thanks. @JamesHenry Should be all ready will wait on a review just wanted to make sure there wasn't something anybody saw that needed changing :)

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. No concerns here.

@JamesHenry
Copy link
Member

Awesome, thanks everyone!

@JamesHenry JamesHenry merged commit 31b0085 into eslint:master Feb 22, 2017
@JamesHenry
Copy link
Member

Oh damn 😦 @corbinu it seems somehow your rebasing ended up putting the wrong commit message in as the final commit for the PR

I think the only way to fix it without rebasing master (which I think block anyway) is to revert the PR and resubmit. I have opened a PR to revert this one.

@JamesHenry
Copy link
Member

@corbinu please could you resubmit this PR with the correct commit message?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants