tutts / es6-express-mongoose-passport-rest-api

Lightweight boilerplate for Node RESTful API, ES6, Express, Mongoose and Passport 🎁
35 stars 8 forks source link

Hints jshint #5

Closed duard closed 7 years ago

duard commented 7 years ago

How can I fix this hints in the code screen shot 2017-10-03 at 7 06 14 am

tutts commented 7 years ago

Hi!

It looks like you have an ESlint plugin built into your IDE, as theres no config it will use the default or traverse until it finds one (I think).

So if you want to use ESlint with Prettier, add ESlint to your project and create a config file for it, you can add the eslint-config-prettier module to your node application, and then use the following extensions:

{
  "extends": [
    "prettier",
    "prettier/standard"
  ]
}

this should then solve your issue :)

tutts commented 7 years ago

Actually thinking about this again, whats the ESLint error you get? It won't be a Prettier compatibility issue, it will be that ESLint doesn't know about Object spreading, so you'll need to add a rule to either ignore it, or refactor into an Object.assign

duard commented 7 years ago

I'm using VSCODE, what is your editor ? If do you use VSCODE what is yours extensions/plugins ?

duard commented 7 years ago

When i open my vscode I see that message

Cannot find module 'eslint-config-prettier/standard' Referenced from: /Users/duard/Development/api-es6/.eslintrc****

duard commented 7 years ago

Everything is fine now

https://www.npmjs.com/package/eslint-plugin-prettier