-
make sure you dont already have eslint installed in your project (uninstall it first if you do)
-
install package
npm i alpin11/alpin11-eslint
-
create
.eslintrc
file in your project root
{
"extends": [
"./node_modules/@undefined/lint/.eslintrc"
]
}
- check if you are running node 16. eslint is required to run on node 16.
you may have to add
"eslint.runtime": "node",
in your vscode settings for eslint to use your local node16 installation.
recommended workspace settings .vscode/settings.json
:
{
"eslint.runtime": "node",
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
}