Skip to content

Conversation

@ijlee2
Copy link
Contributor

@ijlee2 ijlee2 commented Jun 2, 2025

Background

Closes #10660.

Ember CLI's blueprints for the eslint config didn't enable the recommended configurations from eslint-plugin-n and eslint-plugin-qunit.

What changed?

Just like in ijlee2/frontend-configs#42, I splatted the configuration objects from eslint-plugin-n and eslint-plugin-qunit. By splatting the objects at the top, we can always override the values that these plugins had set:

@ijlee2 ijlee2 force-pushed the enable-recommended-eslint-rules branch from 2a28db3 to 5cf6f1d Compare June 2, 2025 18:15
@ijlee2 ijlee2 force-pushed the enable-recommended-eslint-rules branch 4 times, most recently from d967b03 to 8c9e522 Compare June 2, 2025 18:58
Comment on lines 148 to 151
rules: {
'n/no-extraneous-import': 'warn',
'n/no-unsupported-features/node-builtins': 'warn',
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

these aren't fixes tho -- they ignore the errors .

The lints are correct.

node-builtins is telling us we are using features not available on node 18, so we need to fix that.

extraneous-import is telling us that we can't import stuff that isn't in node_modules, -- we should double check that those things are there, and if not, debug what it's really complaining about <3

@ijlee2 ijlee2 marked this pull request as ready for review June 3, 2025 02:48
@ijlee2 ijlee2 force-pushed the enable-recommended-eslint-rules branch 2 times, most recently from acf71fb to e98ca38 Compare June 4, 2025 05:38
@ijlee2 ijlee2 force-pushed the enable-recommended-eslint-rules branch from e98ca38 to 94886c0 Compare June 19, 2025 06:54
},
},
rules: {
'n/no-extraneous-import': 'warn',
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not error?
This should stay as error / default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I had provided the explanation in the 2nd commit. (Workaround for unfamiliarity with ember-cli's test setup.)

a54516d

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have an example of an incorrect violation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

why is it incorrect?

},
rules: {
'n/no-extraneous-import': 'warn',
'n/no-unsupported-features/node-builtins': 'warn',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@NullVoxPopuli NullVoxPopuli force-pushed the enable-recommended-eslint-rules branch from 04dd047 to 27b8614 Compare July 14, 2025 22:11
NullVoxPopuli added a commit to NullVoxPopuli/ember-eslint that referenced this pull request Jul 15, 2025
@NullVoxPopuli
Copy link
Contributor

I've already pulled your changes in to https://github.com/NullVoxPopuli/ember-eslint!!

@NullVoxPopuli NullVoxPopuli force-pushed the enable-recommended-eslint-rules branch from 6337ef7 to 28b99dc Compare July 21, 2025 18:19
@kategengler
Copy link
Member

I'd like to land this but the tests are failing

ijlee2 and others added 7 commits August 15, 2025 14:45
…atures/node-builtins to warn, because tests in ember-cli fail otherwise
…orted-features/node-builtins to warn, because tests in ember-cli fail otherwise"

This reverts commit a54516d.
…o-unsupported-features/node-builtins to warn, because tests in ember-cli fail otherwise""

This reverts commit f7df0f0.
@NullVoxPopuli NullVoxPopuli force-pushed the enable-recommended-eslint-rules branch from 28b99dc to 8608702 Compare August 15, 2025 18:45
@kategengler
Copy link
Member

lgtm but lots of failures?

@NullVoxPopuli
Copy link
Contributor

lgtm but lots of failures?

nay, the only failure here is due to a breaking node change.

More on that here: #10777 (comment)

@NullVoxPopuli NullVoxPopuli merged commit a3b4139 into ember-cli:master Aug 23, 2025
63 of 69 checks passed
This was referenced Aug 6, 2025
@mansona mansona mentioned this pull request Sep 10, 2025
@mansona mansona mentioned this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eslint flat config lost n:recommended and qunit:recommended rulesets

3 participants