mdx-js/mdx-analyzer

Share options between tsconfig and editor configuration

remcohaszing opened this issue · 3 comments

Initial checklist

Problem

#352 introduces a new option. This raises the question: Where does this option belong? We support configuration in tsconfig.json. VS Code supports configuration too.

Solution

Rather than making this choice for each configuration option, it makes sense to support both.

// tsconfig.json
{
  "mdx": {/* … */}
}
// .vscode/settings.json
{
  "mdx.options": {/* … */}
}

They are both just JSON. They can be merged. They can both share the same JSON schema.

Alternatives

N/A

Can remark configs be supported like eslint-remark?

I no longer think this issue is a good idea. Often there’s a relatively clear distinction between project configurations and user preferences. This is even more true since the introduction of the MDXProvidedProps types.

Can remark configs be supported like eslint-remark?

I don’t think this is a good idea. Different tools require different configurations. Adding or removing a parser plugin is relatively rare anyway.

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.