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

[lint] eslint, prettier setup and respective scripts implemented. #87

Closed

Conversation

muskangupta-iitr
Copy link

@muskangupta-iitr muskangupta-iitr commented Mar 15, 2020

Description

Successfully setup eslint and prettier with respective plugins, configurations, ignorefiles and scripts.

Related issues and discussion

Fixes #84

@Nikhil-Vats Review!

@AdrianBZG
Copy link
Member

Hi @muskangupta-iitr , it looks there are some conflicts in package.json, could solve those?

@muskangupta-iitr
Copy link
Author

@AdrianBZG I have rebased the PR.

@muskangupta-iitr
Copy link
Author

@AdrianBZG @Nikhil-Vats I have also added the eslint-config-prettier as discussed in the discord group.

@muskangupta-iitr
Copy link
Author

muskangupta-iitr commented Mar 20, 2020

@Nikhil-Vats @AdrianBZG Can you please review this?

@AdrianBZG
Copy link
Member

Hi @muskangupta-iitr , as happens in PR100, when I run the dev environment I'm getting this error:

`[Browsersync] Watching files...
events.js:183
throw er; // Unhandled 'error' event
^

Error: watch node_modules/minimist/test ENOSPC
at _errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at createFsWatchInstance (/home/adrian.bazaga/Repos/InterMine-Data-Browser-Tool/node_modules/chokidar/lib/nodefs-handler.js:38:15)
at setFsWatchListener (/home/adrian.bazaga/Repos/InterMine-Data-Browser-Tool/node_modules/chokidar/lib/nodefs-handler.js:81:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/adrian.bazaga/Repos/InterMine-Data-Browser-Tool/node_modules/chokidar/lib/nodefs-handler.js:233:14)
at FSWatcher.NodeFsHandler._handleDir (/home/adrian.bazaga/Repos/InterMine-Data-Browser-Tool/node_modules/chokidar/lib/nodefs-handler.js:429:19)
at FSWatcher. (/home/adrian.bazaga/Repos/InterMine-Data-Browser-Tool/node_modules/chokidar/lib/nodefs-handler.js:477:19)
at FSWatcher. (/home/adrian.bazaga/Repos/InterMine-Data-Browser-Tool/node_modules/chokidar/lib/nodefs-handler.js:482:16)
at FSReqWrap.oncomplete (fs.js:153:5)
`

node version: 8.10.0
npm version: 3.5.2

@muskangupta-iitr
Copy link
Author

muskangupta-iitr commented Mar 23, 2020

@AdrianBZG ENOSPC error comes when there is no space in the device. It is working fine in my PC. Did I did anything wrong in the code?
PS: @AdrianBZG https://stackoverflow.com/questions/22475849/node-js-what-is-enospc-error-and-how-to-solve Can you try it out after running this?

@JM-Mendez
Copy link

@muskangupta-iitr it looks like installing those extra packages added too many file handles to the gulp watch command. Try changing this line

gulp.watch('./node_modules/*', gulp.series('clean:vendor', 'vendor'))

To this (remove the wildcard)
gulp.watch('./node_modules', gulp.series('clean:vendor', 'vendor'))

You may have to add the trailing /, I can't be sure without running the command, and I'm not by my computer at the moment.

Ensure that the expected packages are still properly updated, by running npm uninstall bootstrap, and then npm install bootstrap. If the page reloads and applies the changes, then it should be a valid fix

.eslintignore Outdated Show resolved Hide resolved
.eslintignore Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@Nikhil-Vats
Copy link
Member

@muskangupta-iitr Thank you so much for working on this one. 🎉 It's a big one and hence can already be counted as a contribution (feel free to do so).

Please be aware - this is a great start! 🚀 💯 I've mentioned quite a few things to improve, but not because it's bad - just because I think we can make it even better.

@muskangupta-iitr
Copy link
Author

@Nikhil-Vats Thanks for reviewing my contribution and suggesting changes to it. I am glad to know them as working on them would improve my learning. I am reading more about linting and the related stuff and will try to update the PR asap. Also, thanks for the appreciation, it really means a lot :)

@muskangupta-iitr
Copy link
Author

@Nikhil-Vats @AdrianBZG I have updated the PR. Please have a look on it.

@AdrianBZG AdrianBZG closed this in dc624f3 Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[lint] Missing code linting and code formatting configurations
5 participants