8000 GitHub - is2ei/angular-eslint: :sparkles: Monorepo for all the tooling related to using ESLint with Angular
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

✨ Monorepo for all the tooling related to using ESLint with Angular

License

Notifications You must be signed in to change notification settings

is2ei/angular-eslint

 
 

Repository files navigation

Angular ESLint

Monorepo for all the tooling which enables ESLint to lint Angular projects

Azure Pipelines NPM Version GitHub license NPM Downloads Codecov Commitizen friendly


This project is made possible thanks to the continued hard work going into https://github.com/typescript-eslint/typescript-eslint, and brilliant work on the original TSLint rule implementations in https://github.com/mgechev/codelyzer.

Feel free to begin playing with the tooling in your own projects and submit PRs with missing rules and bug fixes.

We would also be very grateful for documentation PRs!


Packages included in this project

Please follow the links below for the packages you care about.

  • @angular-eslint/builder - An Angular CLI Builder which is used to execute ESLint on your Angular projects using standard commands such as ng lint

    • This package is also used to power ESLint usage within https://github.com/nrwl/nx workspaces, regardless of which framework is being used.
  • @angular-eslint/eslint-plugin - An ESLint-specific plugin that contains rules which are specific to Angular projects. It can be combined with any other ESLint plugins in the normal way.

  • @angular-eslint/template-parser - An ESLint-specific parser which leverages the @angular/compiler to allow for custom ESLint rules to be written which assert things about your Angular templates.

  • @angular-eslint/eslint-plugin-template - An ESLint-specific plugin which, when used in conjunction with @angular-eslint/template-parser, allows for Angular template-specific linting rules to run.


Migrating from Codelyzer and TSLint

If you are looking for general help in migrating from TSLint to ESLint, you can check out this project: https://github.com/typescript-eslint/tslint-to-eslint-config

For Angular project's specifically, the migration involves a few different aspects:

  1. Replacing the builder the Angular CLI will use when you run ng lint

  2. Replacing your tslint.json files with .eslintrc.json files

  3. Populating the .eslintrc.json files appropriately to match the previous setup you had in the Codelyzer + TSLint world

The best source of information for performing this migration is located within the Angular CLI integration test within this monorepo. Check out the relevant configuration files:

Soon we will provide an example project and also an ng add schematic to handle all of this for you automatically.

If you are interested in creating this, we would be very grateful to receive a PR in the meantime!

Rules List

Help wanted to document previous Codelyzer rules and progress made so far in this repo!

Please use this as inspiration: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/ROADMAP.md

You can also see how the setup and rules are mapped within the integration test setup: packages/integration-tests/fixtures/angular-cli-workspace/.eslintrc.js

About

✨ Monorepo for all the tooling related to using ESLint with Angular

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 95.5%
  • JavaScript 4.1%
  • Other 0.4%
0