Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to ESLint #176

Closed
bampakoa opened this issue Sep 2, 2022 · 7 comments
Closed

Migrate to ESLint #176

bampakoa opened this issue Sep 2, 2022 · 7 comments

Comments

@bampakoa
Copy link
Collaborator

bampakoa commented Sep 2, 2022

@stevermeister what do you think about migrating the project to ESLint using the angular-eslint?

@stevermeister
Copy link
Owner

@bampakoa yes, sure! good idea!

the whole migration should be just a few commands:

ng add @angular-eslint/schematics
ng g @angular-eslint/schematics:convert-tslint-to-eslint
ng lint

and hope that everything works as expected? :)

@bampakoa
Copy link
Collaborator Author

bampakoa commented Sep 8, 2022

Yes, that's correct. Do you want to try it by yourself? 🙂

@stevermeister
Copy link
Owner

after 1 and 2
for ng lint
I'm getting a strange error:

[error] Error: Cannot find builder "@angular-devkit/build-angular:tslint".
    at WorkspaceNodeModulesArchitectHost.resolveBuilder (/Users/stevermeister/workspace/stevermeister/ngx-wig/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:130:19)
    at LintCommandModule.getArchitectTargetOptions (/Users/stevermeister/workspace/stevermeister/ngx-wig/node_modules/@angular/cli/src/command-builder/architect-base-command-module.js:81:47)
    at async LintCommandModule.builder (/Users/stevermeister/workspace/stevermeister/ngx-wig/node_modules/@angular/cli/src/command-builder/architect-command-module.js:50:31)
    at async runCommand (/Users/stevermeister/workspace/stevermeister/ngx-wig/node_modules/@angular/cli/src/command-builder/command-runner.js:111:5)
    at async default_1 (/Users/stevermeister/workspace/stevermeister/ngx-wig/node_modules/@angular/cli/lib/cli/index.js:70:16)

@stevermeister
Copy link
Owner

just forgot to specify the project:

ng lint --project=ngx-wig

@stevermeister
Copy link
Owner

✖ 45 problems (45 errors, 0 warnings)

and one more command:

 ng lint --project=ngx-wig --fix

✖ 17 problems (17 errors, 0 warnings)

almost there... :)

@stevermeister
Copy link
Owner

All files pass linting.

only I have this warning now:

Warning: 'noEslintrc' option has been declared with a 'no' prefix in the schema.Please file an issue with the author of this package.

@stevermeister
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants