Skip to content

Commit

Permalink
Merge pull request #76 from lostfictions/master
Browse files Browse the repository at this point in the history
add eslint
  • Loading branch information
drcmda committed Apr 21, 2019
2 parents 587ebd7 + 5527ce4 commit 7e58f9c
Show file tree
Hide file tree
Showing 4 changed files with 746 additions and 26 deletions.
41 changes: 41 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"prettier"
],
"plugins": [
"react-hooks"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"curly": [
"warn",
"multi-line",
"consistent"
],
"no-console": "off",
"no-dupe-class-members": "error",
"no-empty": "warn",
"no-undef": "error",
"no-unused-expressions": "error",
"no-unused-vars": "error",
"no-var": "warn",
"prefer-const": "warn",
"no-shadow": "warn",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
}
}
18 changes: 9 additions & 9 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"dist/index.js": {
"bundled": 25161,
"minified": 11960,
"gzipped": 4353,
"bundled": 25173,
"minified": 11956,
"gzipped": 4347,
"treeshaked": {
"rollup": {
"code": 9733,
"import_statements": 602
"code": 9745,
"import_statements": 615
},
"webpack": {
"code": 11292
"code": 11288
}
}
},
"dist/index.cjs.js": {
"bundled": 28174,
"minified": 13680,
"gzipped": 4567
"bundled": 28214,
"minified": 13691,
"gzipped": 4561
}
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"prebuild": "rimraf dist",
"build": "rollup -c",
"prepare": "npm run build",
"eslint": "eslint ./src",
"test": "echo \"Error: no test specified\" && exit 1"
},
"husky": {
Expand Down Expand Up @@ -72,15 +73,23 @@
"@babel/preset-env": "7.3.4",
"@babel/preset-react": "7.0.0",
"@babel/preset-typescript": "^7.3.3",
"babel-eslint": "^10.0.1",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-react-hooks": "^1.6.0",
"husky": "^1.3.1",
"lint-staged": "^8.1.5",
"prettier": "^1.16.4",
"react": ">=16.8",
"react-dom": ">=16.8",
"rollup": "^1.4.1",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^4.0.1",
"rollup-plugin-size-snapshot": "^0.8.0",
"three": ">=0.100",
"typescript": "^3.3.3333"
}
}
Loading

0 comments on commit 7e58f9c

Please sign in to comment.