Skip to content

Commit

Permalink
Get eslint working for react, see #26
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisklus committed Jul 23, 2019
1 parent 8bfd452 commit 4a15d53
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
10 changes: 10 additions & 0 deletions js/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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"
};
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
}
}
}
3 changes: 0 additions & 3 deletions react-binder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
Expand Down

0 comments on commit 4a15d53

Please sign in to comment.