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/template-parser
Advanced tools
@angular-eslint/template-parser is a parser for Angular templates that integrates with ESLint. It allows developers to lint Angular templates using ESLint rules, ensuring code quality and consistency in Angular projects.
Parsing Angular Templates
This feature allows you to parse Angular templates into an Abstract Syntax Tree (AST), which can then be analyzed or transformed. The code sample demonstrates how to parse a simple Angular template.
const parser = require('@angular-eslint/template-parser');
const ast = parser.parse('<div>{{ title }}</div>');
console.log(ast);
Integration with ESLint
This feature allows you to integrate the template parser with ESLint, enabling you to apply ESLint rules to Angular templates. The code sample shows a basic ESLint configuration using the @angular-eslint/template-parser.
module.exports = {
parser: '@angular-eslint/template-parser',
plugins: ['@angular-eslint'],
extends: ['plugin:@angular-eslint/recommended'],
rules: {
// custom rules
}
};
eslint-plugin-angular is a plugin for ESLint that provides linting rules specific to AngularJS (Angular 1.x). While it offers similar functionality in terms of linting Angular code, it is designed for the older version of Angular and does not support Angular templates in the same way as @angular-eslint/template-parser.
Codelyzer is a set of TSLint rules for static code analysis of Angular TypeScript projects. It provides similar functionality in terms of linting Angular code, but it is based on TSLint, which has been deprecated in favor of ESLint. @angular-eslint/template-parser is part of the modern ESLint ecosystem.
Please see https://github.com/angular-eslint/angular-eslint for full usage instructions and guidance.
The @angular-eslint/template-parser
package is a custom parser for ESLint which allows you to write lint rules and run linting using ESLint on Angular templates.
FAQs
Angular Template parser for ESLint
The npm package @angular-eslint/template-parser receives a total of 1,542,849 weekly downloads. As such, @angular-eslint/template-parser popularity was classified as popular.
We found that @angular-eslint/template-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.