Wire up testing and linting
This commit is contained in:
36
.eslintrc
Normal file
36
.eslintrc
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"parser": "babel-eslint",
|
||||
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
|
||||
"extends": ["eslint:recommended", "plugin:react/recommended"],
|
||||
|
||||
"plugins": [
|
||||
"react"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
"semi": [2, "never"],
|
||||
"strict": 0,
|
||||
"quotes": 1,
|
||||
"no-unused-vars": 1,
|
||||
"no-multi-spaces": 1,
|
||||
"camelcase": 1,
|
||||
"no-use-before-define": [2,"nofunc"],
|
||||
"no-underscore-dangle": 0,
|
||||
"no-unused-expressions": 1,
|
||||
"comma-dangle": 0,
|
||||
"no-console": ["error", { allow: ["warn", "error"] }],
|
||||
"react/jsx-no-bind": 1,
|
||||
"react/display-name": 0
|
||||
}
|
||||
}
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ node_modules
|
||||
.deps_check
|
||||
.DS_Store
|
||||
npm-debug.log
|
||||
.eslintcache
|
||||
|
||||
15
package.json
15
package.json
@@ -26,7 +26,13 @@
|
||||
"deps-license": "license-checker --production --csv --out $npm_package_config_deps_check_dir/licenses.csv && license-checker --development --csv --out $npm_package_config_deps_check_dir/licenses-dev.csv",
|
||||
"deps-size": "webpack -p --config webpack.check.js --json | webpack-bundle-size-analyzer >| $npm_package_config_deps_check_dir/sizes.txt",
|
||||
"deps-check": "npm run deps-license && npm run deps-size",
|
||||
"just-test-in-node": "mocha --recursive --compilers js:babel-core/register test/core"
|
||||
"lint": "eslint --cache --ext '.js,.jsx' src/js test",
|
||||
"lint-errors": "eslint --cache --quiet --ext '.js,.jsx' src/js test",
|
||||
"lint-fix": "eslint --cache --ext '.js,.jsx' src/js test --fix",
|
||||
"test": "npm run lint-errors && npm run just-test-in-node",
|
||||
"test-in-node": "npm run lint-errors && npm run just-test-in-node",
|
||||
"just-test": "karma start --config karma.conf.js",
|
||||
"just-test-in-node": "mocha --recursive --compilers js:babel-core/register test/core test/components"
|
||||
},
|
||||
"dependencies": {
|
||||
"brace": "0.7.0",
|
||||
@@ -84,11 +90,18 @@
|
||||
"css-loader": "0.22.0",
|
||||
"deep-extend": "^0.4.1",
|
||||
"deepmerge": "^1.3.2",
|
||||
"eslint": "^2.13.1",
|
||||
"eslint-plugin-react": "^4.3.0",
|
||||
"extract-text-webpack-plugin": "0.8.2",
|
||||
"file-loader": "0.8.4",
|
||||
"html-webpack-plugin": "^2.28.0",
|
||||
"imports-loader": "0.6.5",
|
||||
"json-loader": "0.5.3",
|
||||
"karma": "^0.13.22",
|
||||
"karma-chrome-launcher": "^0.2.3",
|
||||
"karma-mocha": "^0.2.2",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-webpack": "1.8.0",
|
||||
"less": "2.5.3",
|
||||
"less-loader": "2.2.1",
|
||||
"license-checker": "^8.0.4",
|
||||
|
||||
Reference in New Issue
Block a user