How to lint Strapi

I see Strapi comes with a provided eslintrc file, but no eslint in package.json. Are there any recommendations for linting Strapi?

can someone help?

Hi it was quite simple if it help you.
First I installed

npm install babel-eslint

Then I added fo package.json:

"scripts": {
    ...
    "lint": "eslint --ext .js src",
    "lint:fix": "eslint --ext .js src--fix",
...
  },

After that you can call

npm run lint 
npm run lint:fix
1 Like