Skip to content
Snippets Groups Projects
Commit fffeef45 authored by James Calfee's avatar James Calfee
Browse files

Simple eslint rules with npm test integration. #76

parent 798178cc
No related branches found
No related tags found
No related merge requests found
{
"extends": "airbnb"
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module"
},
"env": {
"es6": true,
"node": true,
"browser": true,
"mocha": true,
},
"rules": {
"no-undef": ["error"],
"no-const-assign": ["error"],
"no-this-before-super": ["error"],
"use-isnan": ["error"],
"prefer-const": ["warn"],
"no-var": ["warn"],
"no-unused-vars": ["warn"],
"no-unreachable": ["warn"],
"no-shadow": ["warn"],
"no-constant-condition": ["warn"],
"no-shadow-restricted-names": ["off"], # warn misfired on 'import' statements
},
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
"description": "Steem.js the JavaScript API for Steem blockchain",
"main": "index.js",
"scripts": {
"test": "mocha -t 20000 --require babel-polyfill --require babel-register",
"test": "eslint --quiet src test; mocha -t 20000 --require babel-polyfill --require babel-register",
"build": "npm run build-browser && npm run build-node",
"build-browser": "rm -rf dist && NODE_ENV=production webpack && gzip -k -f ./dist/*.js && du -h ./dist/*",
"build-node": "mkdir -p ./lib && cp -r ./src/* ./lib/ && babel ./src --out-dir ./lib",
......@@ -44,6 +44,7 @@
},
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.5",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.16.0",
......@@ -51,7 +52,6 @@
"babel-register": "^6.14.0",
"bluebird": "^3.4.6",
"eslint": "^3.5.0",
"eslint-config-airbnb": "^11.1.0",
"eslint-plugin-import": "^1.15.0",
"eslint-plugin-jsx-a11y": "^2.2.2",
"eslint-plugin-react": "^6.2.1",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment