diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000000..0277c4647c --- /dev/null +++ b/.eslintrc @@ -0,0 +1,9 @@ +{ + "extends": "babel", + "rules": { + "max-len": 0 + }, + "env": { + "node": true + } +} diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 0000000000..1f7415a495 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,16 @@ +[ignore] +.*/packages/.*/lib +.*/packages/.*/test + +[include] +packages/*/src + +[libs] +lib/file.js +lib/parser.js +lib/types.js + +[options] +strip_root=true +suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe +suppress_comment= \\(.\\|\n\\)*\\$FlowIssue diff --git a/Makefile b/Makefile index c73eb96001..11cd42fd41 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ watch: clean ./node_modules/.bin/gulp watch lint: - ./node_modules/.bin/kcheck + ./node_modules/.bin/eslint packages/*/src clean: test-clean rm -rf packages/*/lib @@ -45,6 +45,7 @@ test-cov: clean test-ci: make lint NODE_ENV=test make bootstrap + # if ./node_modules/.bin/semver `npm --version` -r ">=3.3.0"; then ./node_modules/.bin/flow check; fi ./scripts/test-cov.sh cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js diff --git a/package.json b/package.json index 19e1709f05..d19df4c4a3 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "devDependencies": { "async": "^1.5.0", "babel-core": "^6.13.2", + "babel-eslint": "^6.1.2", "babel-plugin-transform-class-properties": "^6.6.0", "babel-plugin-transform-flow-strip-types": "^6.3.13", "babel-plugin-transform-runtime": "^6.3.13", @@ -20,8 +21,11 @@ "chalk": "1.1.1", "codecov.io": "^0.1.6", "derequire": "^2.0.2", - "es5-shim": "^4.1.7", - "fs-readdir-recursive": "^0.1.2", + "eslint": "^2.13.1", + "eslint-config-babel": "^1.0.1", + "eslint-plugin-babel": "^3.3.0", + "eslint-plugin-flow-vars": "^0.5.0", + "flow-bin": "^0.31.1", "gulp": "^3.9.0", "gulp-babel": "^6.0.0", "gulp-newer": "^1.0.0", @@ -29,18 +33,11 @@ "gulp-util": "^3.0.7", "gulp-watch": "^4.3.5", "istanbul": "^0.4.5", - "kcheck": "^2.0.0", "lerna": "2.0.0-beta.23", "lerna-changelog": "^0.2.0", "lodash": "^4.2.0", - "matcha": "^0.6.0", - "mkdirp": "^0.5.1", "mocha": "^3.0.0", "output-file-sync": "^1.1.1", - "pad": "^1.0.0", - "path-exists": "^1.0.0", - "progress": "^1.1.8", - "readline-sync": "^1.2.19", "rimraf": "^2.4.3", "semver": "^5.0.0", "shelljs": "^0.7.4",