Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@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.
FAQs
Angular Template parser for ESLint
The npm package @angular-eslint/template-parser receives a total of 1,038,375 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 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.