Skip to content

Provide example on correct configuration for inline templates #2392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tallyb opened this issue Apr 23, 2025 · 2 comments
Open

Provide example on correct configuration for inline templates #2392

Tallyb opened this issue Apr 23, 2025 · 2 comments

Comments

@Tallyb
Copy link

Tallyb commented Apr 23, 2025

Browsing thru the docs, asking all LLMs, and I still cannot figure out the right way to enable rules for inline templates.

@JamesHenry
Copy link
Member

JamesHenry commented Apr 25, 2025

It's covered in the configuring ESLint documentation, which feels like the intuitive location to me 🤔

// Set the custom processor which will allow us to have our inline Component templates extracted
// and treated as if they are HTML files (and therefore have the .html config below applied to them)
processor: angular.processInlineTemplates,

and

// Everything in this config object targets our HTML files (external templates,
// and inline templates as long as we have the `processor` set on our TypeScript config above)
files: ['**/*.html'],

https://github.com/angular-eslint/angular-eslint/blob/main/docs/CONFIGURING_FLAT_CONFIG.md

Linked to from the main README under "Configuring ESLint": https://github.com/angular-eslint/angular-eslint?tab=readme-ov-file#configuring-eslint

@Tallyb
Copy link
Author

Tallyb commented Apr 25, 2025

ok, I see it now. A bit hidden... would be great to have it as a sub section or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants