-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[linting] Use eslint to lint code. + minor refactoring + Travis CI setup #1020
Conversation
I like it! Definitely seems easier to read and makes it more declarative in its intent. I'm going to flag it for 0.5.0 for now to allow for conversation while still focusing on fixing known issues...does anyone think it should be part of 0.4.0?? (Do we think it will actually help folks fix the defects we've found to date??) |
I think this would help development greatly. Since this doesn't affect dependents, I see no reason to wait for a release. @Feder1co5oave I am getting a warning that |
@UziTech and @Feder1co5oave: Let me know if I should merge now or wait until the |
Let's wait a bit, I want to do a dependency check-up beforehand, and be sure to get dependency versions correct. |
Can you confirm that using local copies of gulp and eslint is the right way to go? I think it's safe assuming the dependencies are installed locally? |
You're absolutely right. Local copies are definitely preferred. |
Thanks for confirming that. I forgot to push. |
|
@UziTech: Agreed. Going to submit a WIP PR to continue conversation there - also trying to learn all the things! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me. Would like to get a second pair of eyes though as it looks like we have lint + Travis (woohoo! on both). Want to make sure some of the changes to marked.js are just making things a bit more explicit; the addition/change to edit().replace
, for example.
Looks like @UziTech will be coming in behind me; so, let me know if this should result in an NPM-publish once merged. Would like to go through that process with CI and whatnot a couple more times before adding more publishers to refine the PR templates and process docs. |
Thank you @Feder1co5oave. You're awesome! |
- "0.8" | ||
- "0.6" | ||
- "4" | ||
- "lts/*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably add node
to the versions to get the latest stable version (Node 9.x right now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. I wanna leave the lts in there too since it is required by the selenium-webdriver which is something I'm working with to do cross-browser tests on Browserstack 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya the minimum I always test is lts/*
and node
https://travis-ci.org/Feder1co5oave/marktex/builds/345826064 (still failing due to that link encoding issue I'm solving) |
Josh I think you can finally enable Travis on this repo 🥂 |
See #1076 |
Is it the aim to eventually remove the rules that override the |
I don’t believe so. I think the idea was to get lint tests that matched the current code style. But we need to figure out our roadmap a little better. |
@TheDancingCode: To be honest, I'm not sure I'm following (sorry, still figuring out the vernacular of the users). Would you at least be willing to submit an issue with a little exposition on the idea?? |
Yes, the original idea was to progressively adapt the code style to
@TheDancingCode
The following must stay disabled:
I don't think it worth working on this (apart the one-var). Consider that re-linting code may involve big patches that will likely bring merge conflicts with PRs that were branched from an earlier commit. |
[linting] Use eslint to lint code + minor refactoring + Travis CI setup
See the previous discussion at #999.
closes #1014 and closes #1028 .
closes #967
See the commits list for the history of edits.
Apart from some unnoticeable edits, I've changed some minor code style (see
var
declarations) and refactored thereplace()
function in a OOP way. I believe it looks neat and self-documenting, I'd like to hear from others on this, and accept different proposals.With this PR, eslint is completely happy with the source code as it is, and reports no warning or errors.
The programmer can run
npm run lint
to autofix code style, and get linting feedback before submitting new PRs.Future steps: linting
test/index.js
😄Thanks a lot to @smhg and @joshbruce for their contributions.