Skip to content

Commit b02e480

Browse files
committed
documented import/parse-options + fixed vestigial "two" in config README
1 parent d3d54fc commit b02e480

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,16 @@ specify it here (anymore, as of v0.9).
290290
[babel-eslint]: https://github.com/babel/babel-eslint
291291
[ESTree]: https://github.com/estree/estree
292292

293+
#### `import/parse-options`
294+
295+
This setting will be merged 1-level deep (think `Object.assign`) with the default
296+
parse options and passed as the second parameter to the parser: `parse(file, options)`.
297+
See the [`import/es7-jsx`](https://github.com/benmosher/eslint-plugin-import/tree/master/config)
298+
config file for an example of explicit parse options for Babylon.
299+
300+
Or, if you are using another parser, you may want to set these options as well.
301+
(and maybe contribute another config file! i.e. `eslint-config-import/espree`)
302+
293303
Here is an example `.eslintrc` for reference:
294304

295305
```yaml

config/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This package contains some pre-fabricated ESLint config files, intended for use
22
with [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import).
33

4-
There are currently two configs provided:
4+
The following stock configurations are provided:
55

66
- `import` (index): just the bare-bones rules that catch misspelled/missing names.
77
- `import/warnings`: the above, plus warnings for common mistakes.

0 commit comments

Comments
 (0)