-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Showing
3 changed files
with
44 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,8 +1,18 @@ | ||
/** | ||
* - adds `.jsx` as an extension | ||
* Adds `.jsx` as an extension, and enables JSX parsing. | ||
* | ||
* Even if _you_ aren't using JSX (or .jsx) directly, if your dependencies | ||
* define jsnext:main and have JSX internally, you may run into problems | ||
* if you don't enable these settings at the top level. | ||
*/ | ||
module.exports = { | ||
|
||
settings: { | ||
'import/extensions': ['.js', '.jsx'], | ||
}, | ||
|
||
parserOptions: { | ||
ecmaFeatures: { jsx: true }, | ||
}, | ||
|
||
} |
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,27 @@ | ||
/** | ||
* The basics. | ||
* @type {Object} | ||
*/ | ||
module.exports = { | ||
rules: { | ||
// analysis/correctness | ||
'import/no-unresolved': 'error', | ||
'import/named': 'error', | ||
'import/namespace': 'error', | ||
'import/default': 'error', | ||
'import/export': 'error', | ||
|
||
// red flags (thus, warnings) | ||
'import/no-named-as-default': 'warn', | ||
'import/no-named-as-default-member': 'warn', | ||
'import/no-duplicates': 'warn', | ||
}, | ||
|
||
// need all these for parsing dependencies (even if _your_ code doesn't need | ||
// all of them) | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 6, | ||
ecmaFeatures: { experimentalObjectRestSpread: true }, | ||
}, | ||
} |