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 for YAML config #536

Closed
fregante opened this issue May 4, 2021 · 2 comments
Closed

Support for YAML config #536

fregante opened this issue May 4, 2021 · 2 comments

Comments

@fregante
Copy link
Member

fregante commented May 4, 2021

These are the names/types of config allowed:

xo/lib/constants.js

Lines 118 to 124 in fd8828d

const CONFIG_FILES = [
'package.json',
`.${MODULE_NAME}-config`,
`.${MODULE_NAME}-config.json`,
`.${MODULE_NAME}-config.js`,
`${MODULE_NAME}.config.js`
];

But both eslint and cosmiconfig natively support YAML files as config:

So it'd be great to see support here too, enabling comments without having to deal with JS files (e.g. #468)

@sindresorhus
Copy link
Member

That was an intentional choice. YAML is an awful format. I don't want to encourage use of it. I'd rather support JSON with comments if that's truly needed, but I think it's better to just use JS for config then.

@fregante
Copy link
Member Author

fregante commented May 5, 2021

I think it's better to just use JS for config then.

I suppose that could work, hoping that #468 is fixed soon. It was the reason why RG changed the config to JSON in refined-github/refined-github#4002

ESLint also seems to have the same issue with config in ESM packages: eslint/eslint#14137


I suppose #428 would also be a solution to this issue 😁

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

No branches or pull requests

2 participants