3

I trying to set up the Eslint in VS Code IDE, however after installing the eslint dependency, by $ npm install eslint --save-dev command then executing the below command for configuration

$ ./node_modules/.bin/eslint --init

getting the following error, what is the problem?

eslint : File \AppData\Roaming\npm\eslint.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1 + eslint --init + ~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

mathan
  • 455
  • 3
  • 10

1 Answers1

3

In your powershell you might need to execute

Set-ExecutionPolicy RemoteSigned

Try

npx eslint --init

Also what is the output with

npm run eslint --init
Ayushya
  • 1,862
  • 1
  • 10
  • 15
  • 1
    Also this link might be helpful https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system – Ayushya May 31 '20 at 11:52
  • Thanks you so much.Now I can able to configure. – mathan May 31 '20 at 12:04