Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
angular-eslint
Advanced tools
The angular-eslint package provides a set of tools to integrate ESLint into Angular projects, allowing developers to lint their Angular TypeScript code and templates. It helps maintain code quality and consistency by enforcing coding standards and best practices.
Linting Angular TypeScript Code
This command sets up ESLint in an Angular project, replacing TSLint, which is deprecated. It configures ESLint to work with Angular's TypeScript code, allowing developers to enforce coding standards and catch potential errors.
ng add @angular-eslint/schematics
Linting Angular HTML Templates
After setting up angular-eslint, running this command will lint both TypeScript and HTML templates in the Angular project. It ensures that the HTML templates adhere to best practices and coding standards.
ng lint
Custom ESLint Rules for Angular
This JSON snippet shows how to configure a custom ESLint rule specific to Angular projects. The rule enforces that Angular component classes have a specific suffix, helping maintain naming consistency across the project.
{ "rules": { "@angular-eslint/component-class-suffix": ["error", { "suffixes": ["Component", "View"] }] } }
eslint-plugin-angular is a plugin for ESLint that provides linting rules specific to AngularJS (Angular 1.x) projects. While angular-eslint is designed for modern Angular (Angular 2+), eslint-plugin-angular focuses on the older AngularJS framework, offering rules tailored to its unique patterns and practices.
Codelyzer is a set of TSLint rules for static code analysis of Angular TypeScript projects. It was widely used before the deprecation of TSLint. While angular-eslint is the modern solution for linting Angular projects with ESLint, Codelyzer served a similar purpose for TSLint, providing Angular-specific linting rules.
Please see https://github.com/angular-eslint/angular-eslint for full usage instructions and guidance.
This is the core package that exposes most of the other @angular-eslint/
packages for the common use case of using angular-eslint
with Angular CLI workspaces.
It exposes all the tooling you need to work with ESLint v9 and typescript-eslint
v8 with flat config in v18 of angular-eslint
onwards.
NOTE: For versions of
angular-eslint
older than v18, or workspaces still using ESLint v8 andtypescript-eslint
v7, or the legacy eslintrc config format, you will use a combination of the@angular-eslint/
packages directly.
This package exposes a set of premade ESLint configs that you can use in your eslint.config.js
files. They are not compatible with eslintrc files.
You should access the configs exported from the @angular-eslint/eslint-plugin
package for use in eslintrc files.
FAQs
The tooling which enables ESLint to work with Angular projects
We found that angular-eslint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.