Skip to content

Commit

Permalink
getting eslint to work
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotoNomad0 committed Sep 9, 2020
1 parent 04582ad commit c2d83b5
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 24 deletions.
19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"node": ">=4"
},
"scripts": {
"prepublishOnly": "rm -fr ./dist & babel ./src --out-dir ./dist -s inline && yarn test-jest",
"prepublishOnly": "rm -fr ./dist & babel ./src --out-dir ./dist -s inline && yarn test:unit",
"predeploy": "yarn styleguide:build",
"deploy": "gh-pages -d styleguide",
"postpublish": "yarn deploy && git tag $npm_package_version && git push origin $npm_package_version",
"start": "styleguidist server",
"build": "styleguidist build",
"test-jest": "jest __tests__",
"test": "jest __tests__ && cat ./coverage/lcov.info | coveralls",
"test:unit": "eslint ./src && jest __tests__",
"test": "yarn test:unit && cat ./coverage/lcov.info | coveralls",
"create-coverage-badge": "bash scripts/create-badge-json.sh"
},
"dependencies": {
Expand All @@ -40,13 +40,23 @@
"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.4.5",
"@babel/plugin-transform-runtime": "^7.5.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.5.0",
"@material-ui/core": "^4.6.1",
"@material-ui/icons": "^4.5.1",
"@types/jest": "24.0.22",
"babel-eslint": "^10.1.0",
"coveralls": "^3.0.9",
"eslint": "^5.12.1",
"eslint-config-google": "^0.12.0",
"eslint-config-react-app": "^5.2.1",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^22.1.3",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.0",
"fs-extra": "4.0.3",
"gh-pages": "^3.1.0",
"react": "^16.8.6",
Expand All @@ -69,7 +79,6 @@
"dist/*"
],
"jest": {
"collectCoverage": true,
"collectCoverageFrom": [
"src/core/**.{js,jsx,ts}",
"!**/node_modules/**",
Expand Down
1 change: 1 addition & 0 deletions src/demos/book-package-check/BookPackageCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function BookPackageCheck(/*username, language_code, bookID,*/ props) {

// console.log("Finished rendering bit.");
})(); // end of async part in unnamedFunction
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [bookID, branch, JSON.stringify(checkingOptions), language_code, JSON.stringify(props), username]); // end of useEffect part

if (bookID!=='OBS' && !books.isValidBookID(bookID))
Expand Down
1 change: 1 addition & 0 deletions src/demos/book-packages-check/BookPackagesCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ function BookPackagesCheck(/*username, language_code, bookIDs,*/ props) {
// console.log("Finished rendering bit.");
})(); // end of async part in unnamedFunction
// Doesn't work if we add this to next line: bookIDList,bookIDs,username,branch,checkingOptions,language_code,props
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [JSON.stringify(bookIDList), bookIDs, branch, JSON.stringify(checkingOptions), language_code, JSON.stringify(props), username]); // end of useEffect part

if (bookIDInvalid) {
Expand Down
Loading

0 comments on commit c2d83b5

Please sign in to comment.