diff --git a/js/.eslintrc.js b/js/.eslintrc.js new file mode 100644 index 0000000..8a245d7 --- /dev/null +++ b/js/.eslintrc.js @@ -0,0 +1,10 @@ +// Copyright 2019, University of Colorado Boulder +// @author Chris Klusendorf + +'use strict'; + +module.exports = { + + // Use all of the default rules from eslint file for node code. + "extends": "../../chipper/eslint/node_eslintrc.js" +}; \ No newline at end of file diff --git a/package.json b/package.json index 90d19b9..8c91cba 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "test-local-server": "node js/serverTest.js" }, "devDependencies": { + "eslint-plugin-react": "^7.14.3", "fs-extra": "6.0.1", "gray-matter": "^4.0.1", "grunt": "~1.0.0", @@ -21,6 +22,17 @@ }, "phet": {}, "eslintConfig": { - "extends": "../chipper/eslint/node_eslintrc.js" + "extends": "plugin:react/recommended", + "parserOptions": { + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "settings": { + "react": { + "version": "^16.8.6" + } + } } -} \ No newline at end of file +} diff --git a/react-binder/package.json b/react-binder/package.json index 6cf3d68..673ec84 100644 --- a/react-binder/package.json +++ b/react-binder/package.json @@ -13,9 +13,6 @@ "test": "react-scripts test", "eject": "react-scripts eject" }, - "eslintConfig": { - "extends": "react-app" - }, "browserslist": { "production": [ ">0.2%",