Skip to content

v14 preview: recommended config per RFC #1217 - #2840

Draft
NullVoxPopuli wants to merge 14 commits into
masterfrom
nvp/v14-preview-recommended-config
Draft

NullVoxPopuli wants to merge 14 commits into
masterfrom
nvp/v14-preview-recommended-config

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Breaking. Implements the recommended set from emberjs/rfcs#1217.

Three changes:

  1. The 87 strict-mode-applicable template rules (RFC Appendix A) are enabled for gjs/gts. recommended gets { files: ['**/*.gjs'], rules: gjsRules } and the gts equivalent, so .hbs, .js, and .ts are untouched. The 9 loose-mode-only rules (Appendix B) stay in template-lint-migration.
  2. 13 rules that only fire on ember-source 3.x patterns are out of recommended. None are deleted; apps on older ember-source can re-enable them.
  3. no-builtin-form-components and no-modifier-without-element-usage are in.

Mechanically: recommendedGjs/recommendedGts on the Appendix A rules, recommended: false on the removals, then npm run update and update:eslint-docs.

Verified against a .gjs and a .js file with the built config: template rules fire only on .gjs, the two added rules fire on both, and tryInvoke / getWithDefault / String.prototype.camelize no longer report.

Three conflicts, now resolved

These rules are in RFC Appendix A but carry templateMode: 'loose' in the code, so one of the two is wrong in each case. Each is checked against the rule's implementation and its behavior on a real .gjs file, and split out:

Rule Outcome PR
template-no-extra-mut-helper-argument reports in gjs, templateMode was wrong #2841
template-no-unnecessary-component-helper has a strict-mode code path and gjs tests, templateMode was wrong #2842
template-no-class-bindings returns {} in strict mode, so it belongs in Appendix B #2843, stacked on this branch

#2843 drops it from the gjs/gts set here, taking that set from 88 rules to 87. The RFC appendices need the same move.

Not in this PR

  • The template-lint-migration to hbs rename. Separate concern from the rule set.
  • require-fetch-import, listed for removal in the RFC, is already recommended: false. No change needed.

One test change

tests/lib/rules-preprocessor/gjs-gts-parser-test.js turns off template-no-html-comments, template-no-invalid-interactive, and template-no-unused-block-params. Its fixtures exercise the preprocessor and now trip those rules incidentally.

🤖 Generated with Claude Code

Update: recommended-gjs and recommended-gts are gone

recommended carried their rules already, so both were redundant. Removed from lib/config/ and lib/config-legacy/.

recommended-gts did have one thing recommended lacked: the typescript-eslint eslint-recommended disables. Those moved to lib/ts-eslint-recommended.js and now apply to **/*.gts from recommended, and from the gts export in lib/recommended.mjs, which was missing them.

Rule counts per file, from calculateConfigForFile:

File Rules
a.js 59
a.gjs 147
a.gts 167

no-undef is off and prefer-const is error for .gts only.

Also updated: the doc-generator configEmoji entries, tests/plugin-exports.js, and the README example that extended both configs. The gjs/gts logos in the rules table go away with the configs, so a reader can no longer tell from the table that a template rule is gjs/gts only. docs/svgs/gjs.svg and gts.svg are now unreferenced.

RFC updated in emberjs/rfcs#1217 (commit 76e365f).

- enable the 87 strict-mode-applicable template rules for gjs/gts, scoped
  with files blocks so .hbs and .js/.ts are untouched
- drop 13 rules that only fire on ember-source 3.x patterns
- add no-builtin-form-components and no-modifier-without-element-usage

BREAKING CHANGE: the recommended config reports new errors in gjs/gts
files and no longer reports the legacy JS rules.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🏎️ Benchmark Comparison

Benchmark Control (p50) Experiment (p50) Δ
🟢 js small 13.82 ms 12.34 ms -10.8%
🟢 js medium 6.55 ms 5.91 ms -9.6%
🟢 js large 2.62 ms 2.38 ms -9.4%
⚪ gjs small 1.21 ms 1.19 ms -1.0%
⚪ gjs medium 609.64 µs 599.91 µs -1.6%
⚪ gjs large 238.46 µs 235.00 µs -1.4%
⚪ gts small 1.20 ms 1.20 ms -0.6%
⚪ gts medium 602.55 µs 600.23 µs -0.4%
⚪ gts large 237.41 µs 235.38 µs -0.9%

🟢 faster · 🔴 slower · 🟠 slightly slower · ⚪ within 2%

Full mitata output
clk: ~3.34 GHz
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
runtime: node 24.21.0 (x64-linux)

benchmark                   avg (min … max) p75 / p99    (min … top 1%)
------------------------------------------- -------------------------------
js small (control)            16.74 ms/iter  18.71 ms █ █                  
                      (11.49 ms … 32.78 ms)  32.64 ms ███    ▆             
                    (  6.43 mb …  10.74 mb)   7.31 mb █████▄██▁▁▄▁█▁▄▁▁▄▁▁▄

js small (experiment)         13.25 ms/iter  13.52 ms  ██                  
                      (10.90 ms … 22.78 ms)  20.32 ms ▅██▇▂▅▂              
                    (  5.73 mb …   7.92 mb)   6.32 mb ███████▄▇▄▄▁▄▄▄▄▁▁▁▁▄

                             ┌                                            ┐
                              ╷  ┌───────┬───┐                            ╷
          js small (control)  ├──┤       │   ├────────────────────────────┤
                              ╵  └───────┴───┘                            ╵
                             ╷┌───┬             ╷
       js small (experiment) ├┤   │─────────────┤
                             ╵└───┴             ╵
                             └                                            ┘
                             10.90 ms           21.77 ms           32.64 ms

summary
  js small (experiment)
   1.26x faster than js small (control)

------------------------------------------- -------------------------------
js medium (control)            7.40 ms/iter   7.58 ms  █                   
                       (6.11 ms … 14.52 ms)  14.14 ms  █                   
                    (  2.55 mb …   4.54 mb)   3.55 mb ██▅▃▃▅▂▂▂▂▁▂▁▂▁▁▁▂▂▁▂

js medium (experiment)         6.70 ms/iter   6.57 ms  █                   
                       (5.54 ms … 14.79 ms)  14.64 ms ██                   
                    (  2.22 mb …   4.20 mb)   3.23 mb ██▆▄▄▃▂▂▁▂▂▂▁▂▁▁▁▂▂▁▂

                             ┌                                            ┐
                                ╷┌────┬┐                                ╷
         js medium (control)    ├┤    │├────────────────────────────────┤
                                ╵└────┴┘                                ╵
                             ╷┌────┬                                      ╷
      js medium (experiment) ├┤    │──────────────────────────────────────┤
                             ╵└────┴                                      ╵
                             └                                            ┘
                             5.54 ms           10.09 ms            14.64 ms

summary
  js medium (experiment)
   1.1x faster than js medium (control)

------------------------------------------- -------------------------------
js large (control)             3.09 ms/iter   2.99 ms ▂█                   
                       (2.31 ms … 12.77 ms)   7.88 ms ██                   
                    (162.81 kb …   3.30 mb)   1.45 mb ██▅▃▃▂▃▂▁▁▁▁▂▂▁▂▁▁▁▁▁

js large (experiment)          2.67 ms/iter   2.46 ms ▃█                   
                        (2.23 ms … 7.09 ms)   6.45 ms ██                   
                    (363.86 kb …   2.81 mb)   1.31 mb ██▃▂▂▂▂▁▁▂▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                              ╷┌────┬                                     ╷
          js large (control)  ├┤    │─────────────────────────────────────┤
                              ╵└────┴                                     ╵
                             ┌───┬                             ╷
       js large (experiment) │   │─────────────────────────────┤
                             └───┴                             ╵
                             └                                            ┘
                             2.23 ms            5.05 ms             7.88 ms

summary
  js large (experiment)
   1.16x faster than js large (control)

------------------------------------------- -------------------------------
gjs small (control)            1.35 ms/iter   1.28 ms █                    
                        (1.17 ms … 7.68 ms)   6.24 ms █                    
                    (511.95 kb …   1.66 mb)   1.06 mb █▅▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gjs small (experiment)         1.32 ms/iter   1.23 ms █                    
                        (1.17 ms … 6.92 ms)   6.10 ms █                    
                    (290.13 kb …   1.84 mb)   1.06 mb █▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ┌─┬                                          ╷
         gjs small (control) │ │──────────────────────────────────────────┤
                             └─┴                                          ╵
                             ┌┬                                          ╷
      gjs small (experiment) ││──────────────────────────────────────────┤
                             └┴                                          ╵
                             └                                            ┘
                             1.17 ms            3.70 ms             6.24 ms

summary
  gjs small (experiment)
   1.02x faster than gjs small (control)

------------------------------------------- -------------------------------
gjs medium (control)         669.08 µs/iter 621.94 µs █                    
                      (581.53 µs … 6.16 ms)   3.41 ms █                    
                    (146.34 kb …   1.11 mb) 542.00 kb █▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gjs medium (experiment)      656.48 µs/iter 619.23 µs █▂                   
                      (571.02 µs … 6.34 ms)   1.87 ms ██                   
                    ( 74.85 kb …   1.04 mb) 540.34 kb ██▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ┌─┬                                          ╷
        gjs medium (control) │ │──────────────────────────────────────────┤
                             └─┴                                          ╵
                             ┌┬                   ╷
     gjs medium (experiment) ││───────────────────┤
                             └┴                   ╵
                             └                                            ┘
                             571.02 µs           1.99 ms            3.41 ms

summary
  gjs medium (experiment)
   1.02x faster than gjs medium (control)

------------------------------------------- -------------------------------
gjs large (control)          263.00 µs/iter 253.75 µs  █                   
                      (231.08 µs … 5.68 ms) 363.08 µs ▃█                   
                    (216.09 kb … 934.52 kb) 217.27 kb ██▅▅█▃▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁

gjs large (experiment)       262.76 µs/iter 249.25 µs  █                   
                      (226.55 µs … 6.04 ms) 318.07 µs  █▇                  
                    ( 16.69 kb …   1.06 mb) 216.67 kb ▂██▄▄▅▇▃▂▂▂▂▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                              ╷ ┌────────┬                                ╷
         gjs large (control)  ├─┤        │────────────────────────────────┤
                              ╵ └────────┴                                ╵
                             ╷ ┌─────────┬                 ╷
      gjs large (experiment) ├─┤         │─────────────────┤
                             ╵ └─────────┴                 ╵
                             └                                            ┘
                             226.55 µs         294.82 µs          363.08 µs

summary
  gjs large (experiment)
   1x faster than gjs large (control)

------------------------------------------- -------------------------------
gts small (control)            1.31 ms/iter   1.22 ms █                    
                        (1.18 ms … 6.86 ms)   5.96 ms █                    
                    (222.05 kb …   1.63 mb)   1.06 mb █▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gts small (experiment)         1.31 ms/iter   1.22 ms █                    
                        (1.16 ms … 6.51 ms)   6.05 ms █                    
                    (614.93 kb …   1.57 mb)   1.05 mb █▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ┌┬                                          ╷
         gts small (control) ││──────────────────────────────────────────┤
                             └┴                                          ╵
                             ┌┬                                           ╷
      gts small (experiment) ││───────────────────────────────────────────┤
                             └┴                                           ╵
                             └                                            ┘
                             1.16 ms            3.60 ms             6.05 ms

summary
  gts small (experiment)
   1x faster than gts small (control)

------------------------------------------- -------------------------------
gts medium (control)         657.28 µs/iter 613.90 µs █                    
                      (575.98 µs … 6.11 ms)   3.19 ms █                    
                    (175.30 kb …   1.38 mb) 541.46 kb █▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gts medium (experiment)      656.89 µs/iter 618.13 µs █                    
                      (569.70 µs … 6.27 ms)   2.09 ms █▇                   
                    (146.63 kb …   1.20 mb) 540.92 kb ██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ┌─┬                                          ╷
        gts medium (control) │ │──────────────────────────────────────────┤
                             └─┴                                          ╵
                             ┌┬                        ╷
     gts medium (experiment) ││────────────────────────┤
                             └┴                        ╵
                             └                                            ┘
                             569.70 µs           1.88 ms            3.19 ms

summary
  gts medium (experiment)
   1x faster than gts medium (control)

------------------------------------------- -------------------------------
gts large (control)          261.89 µs/iter 249.96 µs  █                   
                      (229.50 µs … 5.75 ms) 322.71 µs  █▆                  
                    (216.09 kb …   1.00 mb) 216.91 kb ▅██▄▄▆▅▃▂▁▁▁▁▁▁▁▁▁▁▁▁

gts large (experiment)       261.81 µs/iter 250.20 µs  █▇                  
                      (226.77 µs … 5.66 ms) 307.30 µs  ██                  
                    (215.23 kb …   1.27 mb) 216.65 kb ▆██▇▄▆██▄▂▂▃▂▂▁▁▁▁▁▁▁

                             ┌                                            ┐
                              ╷ ┌────────────┬                            ╷
         gts large (control)  ├─┤            │────────────────────────────┤
                              ╵ └────────────┴                            ╵
                             ╷ ┌─────────────┬                     ╷
      gts large (experiment) ├─┤             │─────────────────────┤
                             ╵ └─────────────┴                     ╵
                             └                                            ┘
                             226.77 µs         274.74 µs          322.71 µs

summary
  gts large (experiment)
   1x faster than gts large (control)

@NullVoxPopuli

Copy link
Copy Markdown
Contributor Author

marked as draft because the RFC is not yet approved

NullVoxPopuli and others added 2 commits August 17, 2026 16:44
The gts override re-extends plugin:ember/recommended, which outranks the
root-level rules block, so the three offs had no effect on .gts fixtures.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Flat config `name` shows up in config validation errors and in
--inspect-config, which is otherwise index-based and unreadable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread lib/config/base.js Resolved
Comment thread lib/config/base.js Resolved
NullVoxPopuli and others added 4 commits August 17, 2026 17:28
recommended carries their rules now, scoped per file type. The core-rule
disables that recommended-gts added move to lib/ts-eslint-recommended.js
and apply to **/*.gts from recommended and from the mjs gts export.

BREAKING CHANGE: plugin:ember/recommended-gjs and
plugin:ember/recommended-gts no longer exist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Matches the ember:plugin / ember:parser style. The names no longer collide
with a config, since recommended-gjs and recommended-gts are gone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@NullVoxPopuli

NullVoxPopuli commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

let's keep the recommended rules (in case folks upgrade eslint)

the old rules can be in a "legacy" category

perhaps also the old config can be "recommended-v13" (starting a pattern of keeping old configs for people who want bugfixes, etc etc)

overrides: [
...base.overrides,
{ files: ['**/*.gjs'], rules: gjsRules },
{ files: ['**/*.gts'], rules: { ...gtsRules, ...tsEslintRecommended } },

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

     { files: ['**/*.gts'], rules: { ...gtsRules, ...tsEslintRecommended } },
+    { files: ['**/*.hbs'], /* whatever goes here */ }

however, I'd prefer this hbs config exposed in the lint config

NullVoxPopuli and others added 2 commits October 22, 2026 11:28
- `recommended-v13` is the v13 `recommended` rule set, frozen. An app
  can take v14 without the new rule set.
- The rules that left `recommended` move to a new `Legacy` category.
- `jquery-ember-run`, `no-global-jquery`, and `no-jquery` leave
  `recommended` and go to `Legacy`. Ember 4 removed the jQuery
  integration.
- `template-lint-migration` is now `hbs`. It applies to `**/*.hbs`
  only and sets the hbs parser, so it works next to `recommended`
  with no extra parser block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NullVoxPopuli and others added 3 commits October 22, 2026 11:59
…updates

v14 preview: recommended-v13, Legacy category, hbs config, jQuery rules out
…recommended

`ember/no-deprecated-imports` goes into `recommended` for every file
type. `ember/template-tag-position` and `ember/template-tag-spacing`
go into `recommended` for gjs/gts.

The preprocessor tests lint with `recommended`. Their fixtures now
import `service` in place of the deprecated `inject`, and they turn
off `template-tag-spacing`, because `lines-between-class-members`
already reports the same blank line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sync-2

v14 preview: sync master, add the 3 new rules to recommended

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant