forked from vergnet/application-amicale
Added support for eslint and prettier using airbnb config
This commit is contained in:
parent
26aded3684
commit
2aac20ccee
3 changed files with 821 additions and 310 deletions
38
.eslintrc.js
38
.eslintrc.js
|
@ -1,4 +1,40 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: '@react-native-community',
|
extends: [
|
||||||
|
'airbnb',
|
||||||
|
'plugin:flowtype/recommended',
|
||||||
|
'prettier',
|
||||||
|
'prettier/flowtype',
|
||||||
|
'prettier/react',
|
||||||
|
],
|
||||||
|
parser: 'babel-eslint',
|
||||||
|
plugins: ['flowtype'],
|
||||||
|
env: {
|
||||||
|
jest: true,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'flowtype/define-flow-type': 1,
|
||||||
|
'flowtype/no-mixed': 2,
|
||||||
|
'flowtype/no-primitive-constructor-types': 2,
|
||||||
|
'flowtype/no-types-missing-file-annotation': 2,
|
||||||
|
'flowtype/no-weak-types': 2,
|
||||||
|
'flowtype/require-parameter-type': 2,
|
||||||
|
'flowtype/require-readonly-react-props': 0,
|
||||||
|
'flowtype/require-return-type': [
|
||||||
|
2,
|
||||||
|
'always',
|
||||||
|
{
|
||||||
|
annotateUndefined: 'never',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'flowtype/require-valid-file-annotation': 2,
|
||||||
|
'flowtype/type-id-match': [2, '^([A-Z][a-z0-9]+)+Type$'],
|
||||||
|
'flowtype/use-flow-type': 1,
|
||||||
|
'flowtype/valid-syntax': 1,
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
flowtype: {
|
||||||
|
onlyFilesWithFlowAnnotation: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
1077
package-lock.json
generated
1077
package-lock.json
generated
File diff suppressed because it is too large
Load diff
16
package.json
16
package.json
|
@ -57,11 +57,19 @@
|
||||||
"react-navigation-header-buttons": "^5.0.0"
|
"react-navigation-header-buttons": "^5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.8.4",
|
"@babel/core": "^7.11.0",
|
||||||
"@babel/runtime": "^7.8.4",
|
"@babel/preset-flow": "^7.10.4",
|
||||||
"@react-native-community/eslint-config": "^1.1.0",
|
"@babel/runtime": "^7.11.0",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
"babel-jest": "^25.1.0",
|
"babel-jest": "^25.1.0",
|
||||||
"eslint": "6.5.1",
|
"eslint": "^7.2.0",
|
||||||
|
"eslint-config-airbnb": "^18.2.0",
|
||||||
|
"eslint-config-prettier": "^6.11.0",
|
||||||
|
"eslint-plugin-flowtype": "^5.2.0",
|
||||||
|
"eslint-plugin-import": "^2.22.0",
|
||||||
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||||
|
"eslint-plugin-react": "^7.20.5",
|
||||||
|
"eslint-plugin-react-hooks": "^4.0.0",
|
||||||
"flow-bin": "^0.123.0",
|
"flow-bin": "^0.123.0",
|
||||||
"jest": "^25.1.0",
|
"jest": "^25.1.0",
|
||||||
"jest-extended": "^0.11.5",
|
"jest-extended": "^0.11.5",
|
||||||
|
|
Loading…
Reference in a new issue