Skip to content

Commit

Permalink
chore(lint): add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
AoDev committed Apr 18, 2019
1 parent ea7e111 commit 4c34a9f
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
main.dist.js
dist
*.map
lib
58 changes: 58 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"env": {
"browser": true,
"jest": true,
"node": true,
"es6": true
},

"extends": [
"eslint-config-standard",
"plugin:react/recommended"
],

"parser": "babel-eslint",

"plugins": [
"standard",
"react",
"import"
],

"settings": {
"react": {
"version": "16.0"
}
},

"rules": {
"brace-style": [2, "stroustrup"],
"comma-dangle": 0,
"import/extensions": 1,
"import/no-unresolved": 2,
"object-curly-spacing": [2, "never"],
"react/jsx-indent-props": [1, 2],
"react/jsx-max-props-per-line": 0,
"react/jsx-no-bind": 2,
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-literals": 0,
"react/jsx-sort-prop-types": 0,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/jsx-wrap-multilines": 1,
"react/no-danger": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-direct-mutation-state": 1,
"react/no-multi-comp": 1,
"react/no-unescaped-entities": 1,
"react/no-unknown-property": 1,
"react/no-unused-prop-types": 1,
"react/prefer-es6-class": 1,
"react/prop-types": 1,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/sort-comp": 1
}
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"compile": "NODE_ENV=production babel src -d lib",
"lint": "eslint src --quiet",
"prepare": "npm run compile",
"tag-release": "npm test && standard-version",
"test": "jest",
Expand Down Expand Up @@ -34,10 +35,18 @@
"@babel/preset-react": "7.0.0",
"@babel/runtime": "7.3.4",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.1.0",
"babel-plugin-module-resolver": "3.2.0",
"enzyme": "3.9.0",
"enzyme-adapter-react-16": "1.10.0",
"eslint": "5.7.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-react": "7.11.1",
"eslint-plugin-standard": "4.0.0",
"jest": "24.1.0",
"mobx": "5.9.0",
"mobx-react": "5.4.3",
Expand Down

0 comments on commit 4c34a9f

Please sign in to comment.