Skip to content

Enabled recommended configs from eslint-plugin-n and eslint-plugin-qunit#10707

Merged
NullVoxPopuli merged 11 commits intoember-cli:masterfrom
ijlee2:enable-recommended-eslint-rules
Aug 23, 2025
Merged

Enabled recommended configs from eslint-plugin-n and eslint-plugin-qunit#10707
NullVoxPopuli merged 11 commits intoember-cli:masterfrom
ijlee2:enable-recommended-eslint-rules

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:

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
},
},
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
Copy link
Contributor

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

@kategengler
Copy link
Member

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

@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