add linter

This commit is contained in:
casperlamboo 2017-12-13 17:18:15 +01:00
parent b5b893e747
commit 6dc871c320
3 changed files with 239 additions and 70 deletions

33
.eslintrc Normal file
View File

@ -0,0 +1,33 @@
{
"extends": "eslint-config-airbnb",
"parser": "babel-eslint",
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"modules": true,
"jsx": true
},
"rules": {
"comma-dangle": [1, "never"],
"no-else-return": 0,
"no-use-before-define": [2, "nofunc"],
"no-param-reassign": 0,
"no-var": 1,
"no-labels": 0,
"guard-for-in": 0,
"prefer-const": 0,
"no-unused-vars": 1,
"key-spacing": [1, {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
"no-loop-func": 1,
"react/sort-comp": [0],
"max-len": [1, 110, 4],
"camelcase": 1,
"new-cap": 0
},
"env": {
"browser": true,
"es6": true
},
"globals": {
"THREE": false
}
}

271
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@
"start": "webpack-dev-server -w",
"ios": "TARGET=app webpack -p && cordova run ios",
"prepare": "npm run build",
"lint": "eslint src",
"build": "npm run build:main && npm run build:module ",
"build:main": "BABEL_ENV=main babel src -s -d lib",
"build:module": "BABEL_ENV=module babel src -s -d module"
@ -51,6 +52,7 @@
"devDependencies": {
"babel-cli": "6.24.1",
"babel-core": "6.24.1",
"babel-eslint": "^5.0.4",
"babel-loader": "^7.0.0",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-inline-import": "^2.0.6",
@ -67,6 +69,9 @@
"babel-preset-stage-0": "^6.24.1",
"cordova": "^7.1.0",
"css-loader": "^0.28.7",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^3.1.0",
"eslint-plugin-react": "^3.16.1",
"html-webpack-plugin": "^2.30.1",
"html-webpack-template": "^6.0.2",
"jss-preset-default": "^4.0.1",