Skip to content

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

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

v14 preview: recommended config per RFC #1217#2840
NullVoxPopuli wants to merge 8 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 16.35 ms 20.92 ms +28.0%
🟢 js medium 7.42 ms 7.21 ms -2.9%
🟢 js large 3.10 ms 2.85 ms -8.0%
gjs small 1.28 ms 1.27 ms -0.4%
gjs medium 625.51 µs 625.56 µs +0.0%
gjs large 248.31 µs 246.63 µs -0.7%
gts small 1.25 ms 1.25 ms +0.1%
gts medium 628.88 µs 630.36 µs +0.2%
gts large 249.27 µs 249.70 µs +0.2%

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

Full mitata output
clk: ~3.08 GHz
cpu: AMD EPYC 7763 64-Core Processor
runtime: node 24.19.0 (x64-linux)

benchmark                   avg (min … max) p75 / p99    (min … top 1%)
------------------------------------------- -------------------------------
js small (control)            19.33 ms/iter  20.24 ms  █▄                  
                      (13.96 ms … 32.01 ms)  31.70 ms ███   █              
                    (  5.41 mb …  10.20 mb)   7.35 mb ████▅▁█▅▁▁▁▁▁▅█▁▅▅▅▁▅

js small (experiment)         21.26 ms/iter  21.93 ms         █▂           
                      (14.42 ms … 31.44 ms)  30.52 ms         ██           
                    (  5.97 mb …   8.80 mb)   6.49 mb ▄▄▄▁▄▄▄▄██▄▇▄▄▁▁▁▁▁▁▄

                             ┌                                            ┐
                             ╷ ┌───────────┬─┐                            ╷
          js small (control) ├─┤           │ ├────────────────────────────┤
                             ╵ └───────────┴─┘                            ╵
                              ╷             ┌───┬┐                     ╷
       js small (experiment)  ├─────────────┤   │├─────────────────────┤
                              ╵             └───┴┘                     ╵
                             └                                            ┘
                             13.96 ms           22.83 ms           31.70 ms

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

------------------------------------------- -------------------------------
js medium (control)            8.27 ms/iter   8.36 ms █▄                   
                       (7.07 ms … 15.39 ms)  15.15 ms ██▃                  
                    (  1.37 mb …   5.71 mb)   3.57 mb ███▅▃▆▆▁▁▁▃▂▁▂▁▂▁▁▁▂▂

js medium (experiment)         7.82 ms/iter   7.81 ms  █                   
                       (6.69 ms … 14.16 ms)  13.97 ms ▆█▃                  
                    (  2.04 mb …   4.47 mb)   3.26 mb ███▇▄▃▆▂▁▁▃▁▂▁▁▁▁▁▃▁▂

                             ┌                                            ┐
                               ╷┌────┬┐                                   ╷
         js medium (control)   ├┤    │├───────────────────────────────────┤
                               ╵└────┴┘                                   ╵
                             ╷ ┌───┬                                ╷
      js medium (experiment) ├─┤   │────────────────────────────────┤
                             ╵ └───┴                                ╵
                             └                                            ┘
                             6.69 ms           10.92 ms            15.15 ms

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

------------------------------------------- -------------------------------
js large (control)             3.40 ms/iter   3.23 ms █▆                   
                        (2.94 ms … 9.30 ms)   8.06 ms ██                   
                    (738.21 kb …   2.11 mb)   1.44 mb ██▄▄▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁

js large (experiment)          3.22 ms/iter   3.15 ms █                    
                        (2.48 ms … 8.80 ms)   7.89 ms █▆▄                  
                    ( 50.90 kb …   3.17 mb)   1.35 mb ███▃▂▃▄▂▁▂▂▁▃▁▁▁▁▁▁▁▂

                             ┌                                            ┐
                                 ┌──┬                                     ╷
          js large (control)     │  │─────────────────────────────────────┤
                                 └──┴                                     ╵
                             ╷┌────┬                                     ╷
       js large (experiment) ├┤    │─────────────────────────────────────┤
                             ╵└────┴                                     ╵
                             └                                            ┘
                             2.48 ms            5.27 ms             8.06 ms

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

------------------------------------------- -------------------------------
gjs small (control)            1.41 ms/iter   1.35 ms █                    
                        (1.21 ms … 5.74 ms)   5.40 ms █▃                   
                    (509.13 kb …   1.64 mb)   1.06 mb ██▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gjs small (experiment)         1.43 ms/iter   1.30 ms █                    
                        (1.22 ms … 6.10 ms)   5.27 ms █                    
                    (325.50 kb …   1.81 mb)   1.06 mb █▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ┌─┬                                          ╷
         gjs small (control) │ │──────────────────────────────────────────┤
                             └─┴                                          ╵
                             ┌─┬                                         ╷
      gjs small (experiment) │ │─────────────────────────────────────────┤
                             └─┴                                         ╵
                             └                                            ┘
                             1.21 ms            3.31 ms             5.40 ms

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

------------------------------------------- -------------------------------
gjs medium (control)         675.37 µs/iter 646.33 µs ▂█                   
                      (591.54 µs … 5.12 ms)   1.84 ms ██                   
                    ( 75.47 kb …   1.10 mb) 540.76 kb ██▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gjs medium (experiment)      679.81 µs/iter 643.29 µs █                    
                      (593.50 µs … 5.48 ms)   2.01 ms ██                   
                    (539.66 kb …   1.26 mb) 541.89 kb ██▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ╷┌─┬                                    ╷
        gjs medium (control) ├┤ │────────────────────────────────────┤
                             ╵└─┴                                    ╵
                             ╷┌─┬                                         ╷
     gjs medium (experiment) ├┤ │─────────────────────────────────────────┤
                             ╵└─┴                                         ╵
                             └                                            ┘
                             591.54 µs           1.30 ms            2.01 ms

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

------------------------------------------- -------------------------------
gjs large (control)          278.12 µs/iter 265.80 µs  █                   
                      (236.68 µs … 4.99 ms) 426.02 µs ▆█                   
                    (216.10 kb … 776.80 kb) 217.48 kb █████▃▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁

gjs large (experiment)       272.24 µs/iter 263.82 µs  █                   
                      (235.35 µs … 4.95 ms) 382.97 µs  █▅                  
                    ( 13.62 kb … 801.94 kb) 216.53 kb ███▃█▇▃▂▂▂▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ╷ ┌───────┬                                  ╷
         gjs large (control) ├─┤       │──────────────────────────────────┤
                             ╵ └───────┴                                  ╵
                             ╷┌───────┬                         ╷
      gjs large (experiment) ├┤       │─────────────────────────┤
                             ╵└───────┴                         ╵
                             └                                            ┘
                             235.35 µs         330.69 µs          426.02 µs

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

------------------------------------------- -------------------------------
gts small (control)            1.34 ms/iter   1.27 ms █                    
                        (1.21 ms … 6.05 ms)   4.40 ms █                    
                    (214.16 kb …   1.57 mb)   1.06 mb █▅▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gts small (experiment)         1.34 ms/iter   1.27 ms █                    
                        (1.21 ms … 5.96 ms)   4.52 ms █                    
                    (336.93 kb …   1.79 mb)   1.05 mb █▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ┌─┬                                        ╷
         gts small (control) │ │────────────────────────────────────────┤
                             └─┴                                        ╵
                             ┌─┬                                          ╷
      gts small (experiment) │ │──────────────────────────────────────────┤
                             └─┴                                          ╵
                             └                                            ┘
                             1.21 ms            2.86 ms             4.52 ms

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

------------------------------------------- -------------------------------
gts medium (control)         676.23 µs/iter 641.40 µs  █                   
                      (591.24 µs … 5.29 ms)   1.59 ms ▃█                   
                    ( 84.59 kb …   1.08 mb) 541.46 kb ██▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

gts medium (experiment)      675.33 µs/iter 644.76 µs ██                   
                      (595.43 µs … 5.08 ms)   1.96 ms ██                   
                    (175.64 kb …   1.13 mb) 540.67 kb ██▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ╷┌─┬                             ╷
        gts medium (control) ├┤ │─────────────────────────────┤
                             ╵└─┴                             ╵
                             ╷┌─┬                                         ╷
     gts medium (experiment) ├┤ │─────────────────────────────────────────┤
                             ╵└─┴                                         ╵
                             └                                            ┘
                             591.24 µs           1.28 ms            1.96 ms

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

------------------------------------------- -------------------------------
gts large (control)          277.00 µs/iter 266.66 µs  █▄                  
                      (237.40 µs … 5.77 ms) 354.05 µs  ██                  
                    (143.88 kb … 901.48 kb) 217.04 kb ▆██▆▃▇▆▅▃▂▂▁▁▁▁▁▁▁▁▁▁

gts large (experiment)       275.33 µs/iter 265.95 µs  █                   
                      (238.14 µs … 5.00 ms) 386.79 µs  █▇                  
                    (170.17 kb … 769.76 kb) 216.75 kb ███▄██▃▂▁▁▁▁▁▁▁▁▁▁▁▁▁

                             ┌                                            ┐
                             ╷ ┌─────────┬                      ╷
         gts large (control) ├─┤         │──────────────────────┤
                             ╵ └─────────┴                      ╵
                             ╷ ┌────────┬                                 ╷
      gts large (experiment) ├─┤        │─────────────────────────────────┤
                             ╵ └────────┴                                 ╵
                             └                                            ┘
                             237.40 µs         312.09 µs          386.79 µs

summary
  gts large (experiment)
   1.01x 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 Outdated
Comment thread lib/config/base.js Outdated
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>
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