angular-eslint icon indicating copy to clipboard operation
angular-eslint copied to clipboard

Install without TSLint

Open jerone opened this issue 5 years ago • 2 comments

My situation is that TSLint was not configured in one project, and partially removed. For that reason, I want to start this project with a clean slate (empty .eslintr.json configuration).

When following all steps, it looks like it's not possible to complete all the steps when TSLint is absent. Or when you want to ignore TSLint configuration.

Before 0.7.0-beta.0 there was a step add-config-to-project which would create a simple .eslintr.json file containing all setup. In the latest version, this step is replaced by convert-tslint-to-eslint, requiring TSLint to exists.

Is there another way to implement Angular-ESLint without TSLint?
Second question, is there a way to implement Angular-ESLint with a default configuration?

jerone avatar Dec 19 '20 13:12 jerone

Having the same issue here. A project where I want to upgrade but I deleted the tslint.json file earlier

rbogdy avatar Jan 13 '21 07:01 rbogdy

Since this was opened we added the ability to set @angular-eslint/schematics to be your default collection in your angular.json. After you do that, when you run ng generate it will point to our schematics and we will handle all the eslint config and builder etc for you.

Alternatively, if for some reason you don't want it to be the default, you can reference our collection explicitly in the generate command:

npx ng g @angular-eslint/schematics:app 

...for example, will invoke our app generator (which behind the scenes invokes the default one from angular-devkit and updates it for eslint.

Cheers!

JamesHenry avatar Feb 07 '21 12:02 JamesHenry