Package Exports
- @hint/parser-babel-config
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@hint/parser-babel-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Babel config (@hint/parser-babel-config)
The babel-config parser allows the user to analyze the Babel
configuration in their projects.
To use it you will have to install it via npm:
npm install @hint/parser-babel-configNote: You can make npm install it as a devDependency using the
--save-dev parameter, or to install it globally, you can use the
-g parameter. For other options see npm's
documentation.
And then activate it via the .hintrc configuration file:
{
"connector": {...},
"formatters": [...],
"hints": {
...
},
"parsers": ["babel-config"],
...
}This parser detects if a .babelrc configuration file is present,
or if the Babel configuration is specified in package.json, and
validates the Babel configuration against the schema.
Events emitted
This parser emits the following events:
parse::start::babel-config, of typeBabelConfigParseStartwhich contains the following information:resource: the resource we are going to parse.
parse:🔚:babel-config, of typeBabelConfigParsewhich contains the following information:resource: the parsed resource.config: an object with a valid configuration.
parse::error::babel-config::json, of typeBabelConfigInvalidJSONwhich contains the following information:resource: the parsed resource.error: the error emited parsing the configuration file.
parse::error::babel-config::circular, of typeBabelConfigInvalidJSONwhich contains the following information:resource: the parsed resource.error: the error emited parsing the configuration file.
parse::error::babel-config::extends, of typeBabelConfigInvalidJSONwhich contains the following information:resource: the parsed resource.error: the error emited parsing the configuration file.
parse::error::babel-config::schema, of typeBabelConfigInvalidSchemawhich contains the following information:resource: the parsed resource.errors: all the errors that the schama validator returns.
Types
If you need to import any type or enum defined in this parser, you need to import them as follows:
import { TypeOrEnumYouWantToUse } from '@hint/parser-babel-config';