-
Notifications
You must be signed in to change notification settings - Fork 80
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
06bb861
commit f7b6a8e
Showing
9 changed files
with
255 additions
and
232 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,49 @@ | ||
module.exports = { | ||
extends: [ | ||
'prettier', | ||
'eslint:recommended', | ||
'plugin:flowtype/recommended', | ||
'prettier/flowtype', | ||
], | ||
parser: 'babel-eslint', | ||
plugins: ['prettier', 'jest', 'flowtype'], | ||
env: { | ||
node: true, | ||
browser: true, | ||
es6: true, | ||
'jest/globals': true, | ||
}, | ||
// custom rules | ||
rules: { | ||
// Error on prettier violations | ||
'prettier/prettier': 'error', | ||
|
||
// New eslint style rules that is not disabled by prettier: | ||
'lines-between-class-members': 'off', | ||
|
||
// Allowing warning and error console logging | ||
// use `invariant` and `warning` | ||
'no-console': ['error'], | ||
|
||
// Opting out of prefer destructuring (nicer with flow in lots of cases) | ||
'prefer-destructuring': 'off', | ||
|
||
// Disallowing the use of variables starting with `_` unless it called on `this`. | ||
// Allowed: `this._secret = Symbol()` | ||
// Not allowed: `const _secret = Symbol()` | ||
'no-underscore-dangle': ['error', { allowAfterThis: true }], | ||
|
||
// Cannot reassign function parameters but allowing modification | ||
'no-param-reassign': ['error', { props: false }], | ||
|
||
// Allowing ++ on numbers | ||
'no-plusplus': 'off', | ||
|
||
// Require // @flow at the top of files | ||
'flowtype/require-valid-file-annotation': [ | ||
'error', | ||
'always', | ||
{ annotationStyle: 'line' }, | ||
], | ||
}, | ||
}; |
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 @@ | ||
/node_modules/* |
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,7 @@ | ||
{ | ||
"trailingComma": "all", | ||
"semi": true, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": 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
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
Oops, something went wrong.