diff --git a/index.ts b/index.ts index ebb7cbf..09b806f 100644 --- a/index.ts +++ b/index.ts @@ -70,16 +70,37 @@ const TRANSFORMER_ARTIFACT_RULES: RuleConfig = { 'no-raw-characters': 'off', }; -// Ember/Glimmer ecosystem style preferences, baked in for projects that -// want their lint to match `ember-template-lint` conventions out of the -// box. Layered on top of TRANSFORMER_ARTIFACT_RULES in `:gts-recommended`. -const EMBER_STYLE_RULES: RuleConfig = { - // Ember/Glimmer convention is self-closing for void elements (``, - // `
`, ``). `ember-template-lint`'s `self-closing-void-elements` - // rule enforces this. html-validate's default is the omitted form - // (``), which would fight every Ember template — match the - // ecosystem default. Rule still fires on style-mixing. - 'void-style': ['error', { style: 'selfclosing' }], +// Stylistic rules from `html-validate:recommended` that fire on +// legitimate Ember/Glimmer code without catching real bugs. Disabled +// here so the lint experience is signal-first ("did I write something +// that breaks at runtime / fails a11y / produces invalid HTML?") rather +// than pedantic-first ("did I follow our preferred attribute style?"). +// +// Each entry is a deliberate choice: the rule has a legitimate +// motivation, but its trade-offs in an Ember context tip toward noise. +// Projects that want them back can re-enable per-rule. +const STYLISTIC_NOISE_OFF: RuleConfig = { + // Bans the `style="..."` attribute. Breaks legitimate runtime + // style-binding (`
`) — a common + // pattern when computed style depends on component args. Use a + // separate stylelint pipeline for inline-style policy if needed. + 'no-inline-style': 'off', + // Insists on either `` (omit) or `` (selfclosing) — + // never both. html-validate defaults to omit; Ember/Glimmer + // convention is selfclosing; mixing is harmless. Rather than pick a + // side and litter every Ember project with violations of the + // opposite default, disable the rule entirely. (`ember-template-lint` + // already enforces selfclosing if a project wants that policy.) + 'void-style': 'off', + // `prefer-native-element` flags `
` and similar + // ARIA-on-generic-element patterns, suggesting the user reach for + // `