@coding-with-hassan/eslint-config-spa
v0.1.0
Published
Shared ESLint flat config for Angular projects.
Maintainers
Readme
@coding-with-hassan/eslint-config-spa
Shared ESLint flat config for Angular projects.
Install
pnpm add -D @coding-with-hassan/eslint-config-spa eslint typescriptUse
Create eslint.config.js in your Angular project root:
module.exports = require('@coding-with-hassan/eslint-config-spa')({ prefix: 'app' });The prefix is the selector prefix used for both component (<app-foo>) and directive (appFoo) selector rules. Each client typically picks its own — e.g. bridal, autozaak, lpx.
For project-specific extras (a custom rule, a folder-specific override), pass an extra array of additional flat-config entries:
module.exports = require('@coding-with-hassan/eslint-config-spa')({
prefix: 'autozaak',
extra: [
{
files: ['**/*.spec.ts'],
rules: { '@typescript-eslint/no-explicit-any': 'off' },
},
],
});What's in it
@eslint/jsrecommendedtypescript-eslintrecommended + stylisticangular-eslintts-recommended for.tsangular-eslinttemplate-recommended + template-accessibility for.htmleslint-config-prettierto disable rules that conflict with Prettier- Customisable selector prefix for components and directives
