Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit c99c3ae

Browse files
author
Kai Cataldo
committed
Add configFile option to readme
1 parent 7a97f15 commit c99c3ae

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ For questions and support please visit the [`#discussion`](https://babeljs.slack
1818
## Known Issues
1919

2020
Flow:
21+
2122
> Check out [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype): An `eslint` plugin that makes flow type annotations global variables and marks declarations as used. Solves the problem of false positives with `no-undef` and `no-unused-vars`.
23+
2224
- `no-undef` for global flow types: `ReactElement`, `ReactClass` [#130](https://github.com/babel/babel-eslint/issues/130#issuecomment-111215076)
2325
- Workaround: define types as globals in `.eslintrc` or define types and import them `import type ReactElement from './types'`
2426
- `no-unused-vars/no-undef` with Flow declarations (`declare module A {}`) [#132](https://github.com/babel/babel-eslint/issues/132#issuecomment-112815926)
2527

2628
Modules/strict mode
29+
2730
- `no-unused-vars: [2, {vars: local}]` [#136](https://github.com/babel/babel-eslint/issues/136)
2831

2932
Please check out [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for React/JSX issues
33+
3034
- `no-unused-vars` with jsx
3135

3236
Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues
@@ -45,12 +49,12 @@ It just needs to export a `parse` method that takes in a string of code and outp
4549

4650
### Supported ESLint versions
4751

48-
ESLint | babel-eslint
49-
------------ | -------------
50-
4.x | >= 6.x
51-
3.x | >= 6.x
52-
2.x | >= 6.x
53-
1.x | >= 5.x
52+
| ESLint | babel-eslint |
53+
| ------ | ------------ |
54+
| 4.x | >= 6.x |
55+
| 3.x | >= 6.x |
56+
| 2.x | >= 6.x |
57+
| 1.x | >= 5.x |
5458

5559
### Install
5660

@@ -80,6 +84,7 @@ Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rule
8084
### Configuration
8185

8286
- `sourceType` can be set to `'module'`(default) or `'script'` if your code isn't using ECMAScript modules.
87+
- `configFile` Optional. If not defined, babel-eslint will use Babel's default configuration file resolution logic. Otherwise, will use the path to config file given. See [Babel's documentation](https://babeljs.io/docs/en/options#configfile) for more details.
8388
- `allowImportExportEverywhere` (default `false`) can be set to `true` to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level.
8489
- `ecmaFeatures.globalReturn` (default `false`) allow return statements in the global scope when used with `sourceType: "script"`.
8590

@@ -90,9 +95,10 @@ Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rule
9095
"parser": "babel-eslint",
9196
"parserOptions": {
9297
"sourceType": "module",
98+
"configFile": "path/to/config.js",
9399
"allowImportExportEverywhere": false,
94100
"ecmaFeatures": {
95-
"globalReturn": false
101+
"globalReturn": false
96102
}
97103
}
98104
}

0 commit comments

Comments
 (0)