
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@s-libs/eslint-config-ng
Advanced tools
This library provides some default config you can use for ESLint in an Angular project.
This library provides some default config you can use for ESLint in an Angular project.
Follow these instructions to get all the community-recommended config from ESLint
,
@typescript-eslint
, and @angular-eslint
.
First install Angular ESLint, following their instructions for your situation. Make sure it is working with their default config.
npm install --save-dev @s-libs/eslint-config-ng
Change eslint.config.js
in your root directory to this, and make adjustments to suit your needs:
// @ts-check
const tseslint = require("typescript-eslint");
const slibs = require("@s-libs/eslint-config-ng");
module.exports = tseslint.config(...slibs, {
files: ["**/*.ts"],
rules: {
"@angular-eslint/directive-selector": ["error", { type: "attribute", prefix: "app", style: "camelCase" }],
"@angular-eslint/component-selector": ["error", { type: "element", prefix: "app", style: "kebab-case" }],
},
});
Use these instructions for much stricter linting, start with the instructions above then continue with these. It starts with all rules from the libraries above, then turns off or modifies rules that Simonton Software subjectively thinks makes the config better.
Follow the instructions above for recommended config and ensure it works.
npm install --save-dev eslint-config-prettier
Change the require
in eslint.config.js
to @s-libs/eslint-config-ng/strict
Add languageOptions
to the eslint.config.js
file you created, so it looks like this:
// @ts-check
const tseslint = require("typescript-eslint");
const slibs = require("@s-libs/eslint-config-ng/strict");
module.exports = tseslint.config(...slibs, {
files: ["**/*.ts"],
languageOptions: { parserOptions: { projectService: true } },
rules: {
"@angular-eslint/directive-selector": ["error", { type: "attribute", prefix: "app", style: "camelCase" }],
"@angular-eslint/component-selector": ["error", { type: "element", prefix: "app", style: "kebab-case" }],
},
});
Warning: the configs from underlying libraries is not as stable as the ones used for their "recommended" configs. It can change with minor version updates to the underlying libraries.
FAQs
This library provides some default config you can use for ESLint in an Angular project.
The npm package @s-libs/eslint-config-ng receives a total of 44 weekly downloads. As such, @s-libs/eslint-config-ng popularity was classified as not popular.
We found that @s-libs/eslint-config-ng 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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.