An open API service indexing awesome lists of open source software.

https://github.com/perfective/eslint-config-angular

A shareable ESLint configuration for the development of Perfective Angular packages
https://github.com/perfective/eslint-config-angular

angular code-quality code-style eslint eslint-config lint typescript

Last synced: 2 months ago
JSON representation

A shareable ESLint configuration for the development of Perfective Angular packages

Awesome Lists containing this project

README

          

= Perfective ESLint Config for Angular

`@perfective/eslint-config-angular` provides
a https://eslint.org/docs/latest/developer-guide/shareable-configs[shareable ESLint configuration]
for developing the `@perfective` https://angular.io[Angular] packages.
This package extends the
`link:https://www.npmjs.com/package/@perfective/eslint-config[@perfective/eslint-config]` package.

`@perfective/eslint-config-angular` uses the following ESLint plugins:

* `link:https://github.com/angular-eslint/angular-eslint[@angular-eslint/eslint-plugin]`;
* `link:https://github.com/cartant/eslint-plugin-rxjs-angular[eslint-plugin-rxjs-angular]`.

== Setup

. Require `@perfective/eslint-config-angular` and its peer dependencies as dev dependencies:
+
[source,bash]
----
npm install --save-dev \
@perfective/eslint-config-angular \
@babel/eslint-parser \
@angular-eslint/eslint-plugin \
@angular-eslint/eslint-plugin-template \
@angular-eslint/template-parser \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint \
eslint-import-resolver-typescript \
eslint-plugin-array-func \
eslint-plugin-cypress \
eslint-plugin-eslint-comments \
eslint-plugin-import \
eslint-plugin-jest \
eslint-plugin-jest-dom \
eslint-plugin-jsdoc \
eslint-plugin-n \
eslint-plugin-prefer-arrow \
eslint-plugin-promise \
eslint-plugin-rxjs \
eslint-plugin-rxjs-angular \
eslint-plugin-security \
eslint-plugin-simple-import-sort \
eslint-plugin-sonarjs \
eslint-plugin-testing-library \
eslint-plugin-unicorn
----
+
. Require the configuration in your root `.eslintrc.js`.
+
[source,javascript]
----
module.exports = {
extends: ['@perfective/eslint-config-angular'],
};
----
+
. Use a separate `.eslintrc.html.js` to lint Angular templates.
+
[source,javascript]
----
module.exports = {
extends: ['@perfective/eslint-config-angular/template'],
};
----

== Rules Configuration Extension Functions

This package re-exports
https://github.com/perfective/eslint-config#rules-configuration-extension-functions[rules configuration functions],
including overrides with additional Angular customizations:

* `typescriptEslintNamingConvention(extensions)`.

== Roadmap

* Remove TSLint support.