diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 00000000..9b76288b --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,7 @@ +extends: airbnb +plugins: + - react + - jsx-a11y + - import +rules: + semi: off diff --git a/config/webpack.config.js b/config/webpack.config.js index cc887910..b52e5344 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -1,5 +1,7 @@ require('es6-promise').polyfill() +/* eslint-disable */ + // Example webpack configuration with asset fingerprinting in production. 'use strict'; diff --git a/package.json b/package.json index 7fc08944..c3c65838 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,11 @@ "chai-enzyme": "^0.6.1", "cheerio": "^0.22.0", "enzyme": "^2.7.0", + "eslint": "^3.17.1", + "eslint-config-airbnb": "^14.1.0", + "eslint-plugin-import": "^2.2.0", + "eslint-plugin-jsx-a11y": "^4.0.0", + "eslint-plugin-react": "^6.10.0", "jquery": "^3.1.1", "jsdom": "^9.9.1", "mocha": "^3.2.0", @@ -52,6 +57,7 @@ }, "scripts": { "test": "mocha test/helpers/browser.js test/**/*.spec.js --compilers js:babel-register", - "heroku-postbuild": "cp config/database.yml.heroku config/database.yml" + "heroku-postbuild": "cp config/database.yml.heroku config/database.yml", + "eslint": "./node_modules/.bin/eslint app/assets/javascripts" } }