Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ESLint flat config #2020

Merged
merged 1 commit into from Dec 12, 2023
Merged

Support ESLint flat config #2020

merged 1 commit into from Dec 12, 2023

Conversation

bmish
Copy link
Member

@bmish bmish commented Dec 11, 2023

This is targeting a v11 branch I created for backporting any changes to v11 (although note that I haven't implemented this for the WIP v12 release yet). I merged this branch into v12 in this PR and updated the new v12 configs to support flat config.


This publicly supports the new ESLint flat config format by adding a new plugin export that can be used like this:

// eslint.config.js
const eslintPluginEmberRecommended = require("eslint-plugin-ember/configs/recommended");

module.exports = [
    ...eslintPluginEmberRecommended,
];

Using legacy config is unchanged:

// .eslintrc.js
module.exports = {
  extends: ['plugin:ember/recommended']
};

In a future breaking change / major version when flat config is more pervasive, we can drop support for the legacy config.

Prior art / related:

@bmish bmish force-pushed the support-flat-config branch 3 times, most recently from ddc3586 to e640251 Compare December 11, 2023 22:10
@bmish bmish marked this pull request as ready for review December 12, 2023 22:46
@bmish bmish merged commit 9a557df into ember-cli:v11 Dec 12, 2023
@bmish bmish deleted the support-flat-config branch December 12, 2023 22:54
@bmish bmish mentioned this pull request Dec 12, 2023
bmish added a commit that referenced this pull request Dec 12, 2023
* Support ESLint flat config (#2020)

* Allow ember-data type registry imports in `use-ember-data-rfc-395-imports` rule (#2027)

* Allow ember-data type registry imports

* fix lint

---------

Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com>

* fix lint

* Release 11.12.0

* fix merge mistakes

---------

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.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.

None yet

1 participant