Skip to content

Commit

Permalink
Added .eslintrc.js & .eslintignore.
Browse files Browse the repository at this point in the history
Added eslint dependencies to package.json and updated yarn.lock accordingly.
Updated react-native to 0.59.5.
  • Loading branch information
coreyphillips committed Apr 18, 2019
1 parent 67d198d commit 27fa969
Show file tree
Hide file tree
Showing 4 changed files with 524 additions and 36 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/nodejs-assets/*
/ios/*
/android/*
!.eslintrc.js
71 changes: 71 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
module.exports = {
"parser": "babel-eslint",
"env": {
"es6": true,
"node": true,
"jest": true,
"browser": true,
"react-native/react-native": true,
},
"plugins": [
"react",
"react-native",
"jsx-a11y"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:jsx-a11y/recommended",
"plugin:react/recommended"
],
"rules": {
"no-console": 0,
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-buffer-constructor": 0,
"no-case-declarations": 0,
"no-useless-escape": 0,
"semi": 2,
"react/jsx-no-duplicate-props": [2, { "ignoreCase": true }],
"react-native/no-unused-styles": 1,
"react-native/no-raw-text": 2,
"react/jsx-equals-spacing": [2, "never"],
"react/no-unsafe": [2, { "checkAliases": true }],
"react/jsx-curly-spacing": [2, {
"when": "never",
"attributes": { "allowMultiline": true },
"children": true,
"spacing": {
"objectLiterals": "never",
}
}],
"react/jsx-uses-vars": 2,
"react/jsx-wrap-multilines": 2,
"react/jsx-tag-spacing": [2,
{
"closingSlash": "never",
"beforeSelfClosing": "always",
"afterOpening": "never",
"beforeClosing": "never"
}
],
"react/jsx-indent": [2, "tab"],
"react/jsx-closing-bracket-location": 2,
"react/jsx-child-element-spacing": 2,
"react/no-unused-prop-types": 2,
"react/prop-types": 0,
"no-undef": 0,
"react/display-name": 0
},
"globals": {
"fetch": false
},
"settings": {
"react": {
"version": "detect",
},
},
};
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"lint": "eslint '**/*.{js,jsx}' --quiet",
"postinstall": "rn-nodeify --install buffer,stream,assert,events,crypto,vm --hack && cd node_modules/bs58 && yarn add [email protected] && cd ../../"
},
"dependencies": {
Expand All @@ -27,7 +28,7 @@
"prop-types": "^15.7.2",
"query-string": "^6.4.2",
"react": "^16.8.6",
"react-native": "^0.59.4",
"react-native": "^0.59.5",
"react-native-camera": "^2.5.0",
"react-native-crypto": "^2.1.2",
"react-native-keychain": "^3.1.1",
Expand Down Expand Up @@ -55,7 +56,13 @@
"@babel/core": "^7.4.3",
"@babel/runtime": "^7.4.3",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.7.1",
"eslint": "^5.16.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-native": "^3.6.0",
"jest": "^24.7.1",
"metro-react-native-babel-preset": "^0.53.1",
"react-test-renderer": "^16.8.6",
Expand Down
Loading

0 comments on commit 27fa969

Please sign in to comment.