Skip to content

babel.config.json language mode should be 'jsonc' #124683

@thernstig

Description

@thernstig

Babel recommends using babel.config.json since a while back. Their JSON is parsed as JSON5, which supports comments. As such babel.config.json should have the language identifier jsonc. In addition the file .babelrc.json should also be get the same language id.

See https://babeljs.io/docs/en/config-files#supported-file-extensions

The change should be done here:

{
"id": "jsonc",
"aliases": [
"JSON with Comments"
],
"extensions": [
".jsonc",
".eslintrc",
".eslintrc.json",
".jsfmtrc",
".jshintrc",
".swcrc",
".hintrc",
".babelrc"
],
"filenames": [
".ember-cli"
],
"configuration": "./language-configuration.json"

Note that .babelrc is still valid and should continue being identified as jsonc.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityjsonJSON support issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions