Skip to content

refactor: convert eslint-parser source and tests to TypeScript #29

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

Merged
merged 10 commits into from
Jan 16, 2019

Conversation

JamesHenry
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jan 16, 2019

Codecov Report

Merging #29 into master will decrease coverage by 0.39%.
The diff coverage is 94.03%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #29     +/-   ##
=========================================
- Coverage   94.16%   93.77%   -0.4%     
=========================================
  Files          13       11      -2     
  Lines        1698     1686     -12     
  Branches      327      376     +49     
=========================================
- Hits         1599     1581     -18     
+ Misses         60       55      -5     
- Partials       39       50     +11
Impacted Files Coverage Δ
packages/typescript-eslint-parser/src/parser.ts 100% <100%> (ø)
...kages/typescript-eslint-parser/src/visitor-keys.ts 100% <100%> (ø)
...ages/typescript-eslint-parser/src/analyze-scope.ts 93.25% <93.25%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2c8788...108e079. Read the comment docs.

@JamesHenry
Copy link
Member Author

Don't know what's up with codecov :/

@JamesHenry
Copy link
Member Author

It's working again :)

@JamesHenry
Copy link
Member Author

I have improved the coverage a bit with some extra commits, but I'm definitely happy to proceed with the -0.4% coverage diff for now.

@armano2 @j-f1 Could you please take another look?

armano2
armano2 previously approved these changes Jan 16, 2019
@armano2
Copy link
Collaborator

armano2 commented Jan 16, 2019

coverage went down because now we are collecting it, i don't see any issues with this

you can set threshold in .codecov.yml threshold like ~2% because now is a little brutal
https://docs.codecov.io/v1.0/docs/commit-status#section-threshold

@JamesHenry
Copy link
Member Author

Thanks @armano2, I've added it to this PR so we don't forget about it

import { ParserOptions } from './parser-options';
import { visitorKeys } from './visitor-keys';

const packageJSON = require('../package.json');
Copy link
Member

@kaicataldo kaicataldo Jan 16, 2019

Choose a reason for hiding this comment

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

Just for my own understanding, why does require need to be used for JSON files? Is it just to avoid having to declare a JSON module interface, or is there something else at play here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

"Is it just to avoid having to declare a JSON module interface", yes

Copy link
Member Author

@JamesHenry JamesHenry Jan 16, 2019

Choose a reason for hiding this comment

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

In this case, if you enabled resolveJsonModule in TS to allow you to import it, it will work, but because the package.json lives in the directory above the src it changes the output directory (dist) to contain nesting:

dist/
  package.json
  src/

Instead of the 1:1 mapping with src

@JamesHenry JamesHenry merged commit 76691a0 into master Jan 16, 2019
@JamesHenry JamesHenry deleted the eslint-parser-to-ts branch January 16, 2019 19:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
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.

3 participants