Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac04081
commit bc991ac
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# @babel/eslint-plugin-development-internal | ||
|
||
A set of internal ESLint rules to enforce best practices in the Babel monorepo. | ||
|
||
## Usage | ||
|
||
The plugin can be loaded in your `.eslintrc.*` configuration file. You can omit the `eslint-plugin-` prefix, like so: | ||
|
||
```json | ||
{ | ||
"plugins": ["@babel/development-internal"] | ||
} | ||
``` | ||
|
||
## Supported Rules | ||
|
||
> Note: Rules marked with :wrench: are autofixable. | ||
### `@babel/development-internal/dry-error-messages` (:wrench:) | ||
|
||
Enforce @babel/parser's error messages to be consolidated in one module. | ||
|
||
Configuration options: | ||
|
||
* `errorModule` (string, required): The rule must be configured with the path to the module containing error messages. | ||
|
||
```json | ||
{ | ||
"rules": { | ||
"@babel/development-internal/dry-error-messages": [ | ||
"error", | ||
{ | ||
"errorModule": "packages/babel-parser/src/parser/location.js" | ||
} | ||
] | ||
} | ||
} | ||
``` |