Eslint - html project

Hi i want to install eslint (like i do for my react projects). However, i am not entirely sure how to do this:

I installed it through node and then did eslint init.

It seems like a package.json is necessary?

would the below be ok? (For react i would precede these steps by doing npx create-react-app but i am not using react in this instance)

  1. do npx init
  2. then install eslint
  3. then do eslint --init
C:\Users\Yaz\freecodecamp-projects\tributes>eslint --init
? How would you like to use ESLint? To check syntax and find problems
? What type of modules does your project use? None of these
? Which framework does your project use? None of these
? Does your project use TypeScript? No
? Where does your code run? Browser
? What format do you want your config file to be in? JavaScript
Could not find a package.json file. Run 'npm init' to create one.

thanks. if someone could help would be appreciated.

Here is the NPM page:


  1. npm init starts your project
  2. npm i {package} will install a package you want to add

but each package has a page on the site above with better instructions and install info!

happy coding!

ah ok so i did npm init then “eslint --init” which then downloaded “eslint@latest”.

from there i have npm install --save-dev eslint-plugin-html;

and then following the webpage recommednation i changed the plugin:

Still doesn’t seem to work 100%.

But thanks anyway :smiley: