diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..65b660c23 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,14 @@ +.DS_Store +node_modules +build +dist +bundle.js +test/tmp +*.log +*.cache +/.eslintcache +.next +coverage +package-lock.json +npm-shrinkwrap.json +yarn.lock \ No newline at end of file diff --git a/package.json b/package.json index a3563256f..72c9ac035 100644 --- a/package.json +++ b/package.json @@ -8,16 +8,21 @@ "docs": "node ./scripts/docs/index.js", "prepare-release": "git checkout master && git pull --rebase origin master && npm run docs && lerna updated", "release": "npm run prepare-release && lerna publish --exact", - "format": "prettier \"{packages,scripts}/**/*.js\" --write", + "lint": "eslint \"{packages,scripts}/**/*.js\"", + "lint:fix": "eslint \"{packages,scripts}/**/*.js\" --fix", + "format": "prettier-eslint \"{packages,scripts}/**/*.js\" --write", "precommit": "lint-staged" }, + "eslintConfig": { + "extends": "airbnb" + }, "prettier": { "printWidth": 100, "singleQuote": true }, "lint-staged": { "*.js": [ - "prettier --write", + "prettier-eslint --write", "git add" ] }, @@ -47,6 +52,11 @@ "devDependencies": { "babel-jest": "^20.0.3", "coveralls": "^2.13.1", + "eslint": "^5.5.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-jsx-a11y": "^6.1.1", + "eslint-plugin-react": "^7.11.1", "fs-jetpack": "^1.3.0", "husky": "^0.14.3", "jest": "^20.0.3", @@ -54,6 +64,7 @@ "lint-staged": "^7.0.4", "marked": "^0.3.19", "prettier": "^1.12.1", + "prettier-eslint-cli": "^4.7.1", "react": "^15.0.0-0 || ^16.0.0-0", "react-dom": "^15.0.0-0 || ^16.0.0-0", "regenerator-runtime": "^0.10.5"