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

feat!: Switch to flat config format #277

Merged
merged 1 commit into from
Aug 17, 2023
Merged

Conversation

nzakas
Copy link
Contributor

@nzakas nzakas commented Jun 26, 2023

As we are switching to a new config system in ESLint, we are also going around and helping popular packages update to the new format. This PR switches eslint-config-standard over to the new flat config format.

This is a breaking change. If you merge this, people will not be able to use this package in the extends field of eslintrc config files. They'll only be able to use it with flat config. I'm not sure how frequently the config changes, but something to consider before merging.

@welcome
Copy link

welcome bot commented Jun 26, 2023

🙌 Thanks for opening this pull request! You're awesome.

@nzakas nzakas mentioned this pull request Jun 26, 2023
69 tasks
@socket-security
Copy link

socket-security bot commented Jun 26, 2023

No top level dependency changes detected. Learn more about Socket for GitHub ↗︎

@mightyiam
Copy link
Contributor

@nzakas your outreach is so kind. I'm sorry this got no response until now.

I'm striving toward this. Before making this change, I'd like to have a full exports test, such as this.

I intend to do that separately.

@nzakas
Copy link
Contributor Author

nzakas commented Aug 14, 2023

No problem. If you run into any issues, please reach out.

eslint.config.js Outdated
promise,
import: importPlugin
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

@nzakas why are the plugins in an object of their own, please?

eslint.config.js Outdated
const promise = require('eslint-plugin-promise')
const globals = require('globals')

module.exports = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it normal that a flat-config shareable config exports an array? Is it desirable?

Copy link
Contributor

Choose a reason for hiding this comment

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

@mightyiam
Copy link
Contributor

This isn't working yet. @nzakas feel free to amend this.

@mightyiam mightyiam force-pushed the flat-config branch 5 times, most recently from 40164f2 to e86b58c Compare August 17, 2023 07:12
BREAKING CHANGE: this package now exports a flat config format
See readme for example usage. See here for more information:
https://eslint.org/docs/latest/use/configure/configuration-files-new

Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
@mightyiam mightyiam merged commit b906c9a into standard:master Aug 17, 2023
@welcome
Copy link

welcome bot commented Aug 17, 2023

🎉 Congrats on getting your first pull request landed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants