This repository was archived by the owner on Sep 13, 2021. It is now read-only.
Open
Conversation
KmBarnett
reviewed
Jan 4, 2021
| import chalk from 'chalk'; | ||
| import cp from 'child_process'; | ||
|
|
||
| export const lint = (lintSources = 'src/') => { |
Contributor
There was a problem hiding this comment.
Is there a reason to allow a user to input his own lint sources
KmBarnett
suggested changes
Jan 4, 2021
Contributor
KmBarnett
left a comment
There was a problem hiding this comment.
I have left a few comments otherwise good just make sure there isn't any standard .eslintrc for each type of project
| export const lint = (lintSources = 'src/') => { | ||
| const path = __dirname + '/../node_modules/eslint/bin/eslint.js'; | ||
|
|
||
| const eslint = cp.spawn(path, [lintSources], { |
Contributor
There was a problem hiding this comment.
Can you add some inline above line 7? cp.spawn isn't very clear to those who haven't used it, makes it more accessible to new contributors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Description
See issue #60
This PR Adds the
mint lint(aliasmint l) command to the list of mint commands. It lints the code of the project usingeslintbehind the scenes. Each template now has a specific.eslintrc. For example, vanilla-js' eslint config file is set to check for semi columns, while react's eslint config file activatesjsxas acceptable syntax.Added to documentation?
Note
I made this PR to showcase this new functionality; feel free to let me know if anything should be improved and/or if there are better ways to approach this.