Skip to content

Commit

Permalink
updates git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Solís committed May 11, 2020
1 parent 1910b0a commit c0523f9
Show file tree
Hide file tree
Showing 6 changed files with 229 additions and 736 deletions.
13 changes: 8 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ module.exports = {
Promise: true
},
env: {
jest: true, // https://stackoverflow.com/a/40265356/586382
jest: true, // https://stackoverflow.com/a/40265356/586382
node: true
},
rules: {
'comma-dangle': 'off',
'import/prefer-default-export': 0,
'function-paren-newline': ['error', 'consistent'],
'prettier/prettier': ['error', {
'singleQuote': true,
'parser': 'flow'
}],
'prettier/prettier': [
'error',
{
singleQuote: true,
parser: 'flow'
}
],
'flowtype/space-after-type-colon': 0
}
};
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"singleQuote": true,
"arrowParens": "avoid"
"arrowParens": "avoid",
"trailingComma": "none"
}

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"lint-staged": {
"*.{js,jsx}": [
"prettier --config .prettierrc --write",
"eslint -c .eslintrc.json --ext .jsx,.js --fix"
"eslint src --fix",
"flow"
]
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion src/defaults/persist.native.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @flow

// $FlowIgnore
import { AsyncStorage } from 'react-native'; // eslint-disable-line
import { persistStore } from 'redux-persist';

export default (store: any, options: {}, callback: any) =>
// $FlowFixMe
persistStore(store, { storage: AsyncStorage, ...options }, callback);
5 changes: 1 addition & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ export const offline = (userConfig: $Shape<Config> = {}) => (
// create autoRehydrate enhancer if required
const offlineEnhancer =
config.persist && config.rehydrate && config.persistAutoRehydrate
? compose(
offlineMiddleware,
config.persistAutoRehydrate()
)
? compose(offlineMiddleware, config.persistAutoRehydrate())
: offlineMiddleware;

// create store
Expand Down
Loading

0 comments on commit c0523f9

Please sign in to comment.