DEV Community

Discussion on: Migrating and configuring Eslint with Angular 11

Collapse
 
denernun profile image
Dener Rocha

Hi, yes, i did...

eslintrc.json

"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],

command

$ eslint --color -c .eslintrc.json --ext .ts ./src/

result

Oops! Something went wrong! :(
ESLint: 7.20.0
ESLint couldn't find the config "prettier/@typescript-eslint" to extend from. Please check that the name of the config is correct.
The config "prettier/@typescript-eslint" was referenced from the config file in ".eslintrc.json".
If you still have problems, please stop by eslint.org/chat/help to chat with the team.

log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'eslint'
1 verbose cli ]
2 info using npm@6.14.11
3 info using node@v14.15.5
4 verbose run-script [ 'preeslint', 'eslint', 'posteslint' ]
5 info lifecycle app@1.0.0~preeslint: app@1.0.0
6 info lifecycle app@1.0.0~eslint: app@1.0.0
7 verbose lifecycle app@1.0.0~eslint: unsafe-perm in lifecycle true
8 verbose lifecycle app@1.0.0~eslint: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\SISTEMAS\CLOUDCLASS\cloudclass-app\node_modules.bin;C:\Program Files\PowerShell\7;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files\Python27\;C:\Program Files\Python27\Scripts;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Firebird\Firebird_2_5\bin;D:\SSL\BIN;D:\SSH;D:\SSH\tools;D:\SVN;D:\UTIL;D:\DLL;C:\Program Files\dotnet\;C:\Program Files\Git LFS;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Common Files\Tom Sawyer Software\10.0.0;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PowerShell\7-preview\preview;C:\Program Files\Java\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:/Program Files (x86)/CS DEVICES/SatCare/Biblioteca de funções;C:\Program Files\PowerShell\7\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\dener\AppData\Local\Microsoft\WindowsApps;C:\Users\dener\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Program Files\kdiff3;C:\Users\dener.dotnet\tools;C:\Users\dener\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\dener\AppData\Local\Microsoft\WindowsApps;C:\Users\dener\AppData\Roaming\DBeaverData\drivers\clients\postgresql\win\12;C:\Users\dener.dotnet\tools;d:\harbour\bin;d:\bcc\bin;;C:\Program Files (x86)\CS DEVICES\SatCare\Biblioteca de funções;C:\Users\dener\AppData\Roaming\npm
9 verbose lifecycle app@1.0.0~eslint: CWD: D:\SISTEMAS\CLOUDCLASS\cloudclass-app
10 silly lifecycle app@1.0.0~eslint: Args: [ '/d /s /c', 'eslint --color -c .eslintrc.json --ext .ts ./src/' ]
11 silly lifecycle app@1.0.0~eslint: Returned: code: 2 signal: null
12 info lifecycle app@1.0.0~eslint: Failed to exec eslint script
13 verbose stack Error: app@1.0.0 eslint: eslint --color -c .eslintrc.json --ext .ts ./src/
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid app@1.0.0
15 verbose cwd D:\SISTEMAS\CLOUDCLASS\cloudclass-app
16 verbose Windows_NT 10.0.21318
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "eslint"
18 verbose node v14.15.5
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 2
22 error app@1.0.0 eslint: eslint --color -c .eslintrc.json --ext .ts ./src/
22 error Exit status 2
23 error Failed at the app@1.0.0 eslint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

if comment "prettier/@typescript-eslint", works fine