
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@angular-eslint/builder
Advanced tools
The @angular-eslint/builder package is an npm package that integrates ESLint into Angular CLI projects. It allows developers to lint their Angular TypeScript code using ESLint, which is a pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. With @angular-eslint/builder, developers can run lint checks as part of their build process or as a separate step in their development workflow.
Linting Angular TypeScript code
This feature allows developers to lint their Angular project's TypeScript code. The command 'ng lint' is used to execute the linting process, which checks the code for any issues or style violations based on the ESLint configurations.
ng lint
Customizable ESLint configurations
Developers can customize ESLint rules for their Angular projects. This code sample shows a snippet of an ESLint configuration file where specific rules for directive and component selectors are defined.
{
"extends": "@angular-eslint/recommended",
"rules": {
"@angular-eslint/directive-selector": ["error", { "type": "attribute", "prefix": "app", "style": "camelCase" }],
"@angular-eslint/component-selector": ["error", { "type": "element", "prefix": "app", "style": "kebab-case" }]
}
}
Integration with Angular CLI
The package integrates with Angular CLI, allowing developers to add linting capabilities to their Angular CLI projects. This code sample shows how to configure the Angular workspace file (angular.json) to use @angular-eslint/builder for the linting process.
{
"architect": {
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
ESLint is the core linting tool that @angular-eslint/builder relies on. It provides a framework for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the ability to configure rules and plugins.
TSLint was a popular linter for TypeScript before being deprecated in favor of ESLint. It provided similar functionality to ESLint but was specifically designed for TypeScript. @angular-eslint/builder offers a migration path for projects moving from TSLint to ESLint.
eslint-plugin-angular is an ESLint plugin that contains linting rules specifically for AngularJS (1.x) projects. It is different from @angular-eslint/builder, which is designed for Angular (2+) projects.
eslint-plugin-react is an ESLint plugin that provides React-specific linting rules. It is similar to @angular-eslint/builder in that it extends ESLint's capabilities to a specific framework, but it targets React instead of Angular.
FAQs
Angular CLI builder for ESLint
We found that @angular-eslint/builder 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.