diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..296c1af --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules +index.es5.js diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..f4ecadc --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,12 @@ +{ + "parser": "babel-eslint", + "extends": "airbnb-base", + "rules": { + "comma-dangle": ["error", "never"], + "jsx-quotes": ["error", "prefer-single"], + "array-bracket-spacing": ["error", "always"] + }, + "plugins": [ + "import" + ] +} diff --git a/.gitignore b/.gitignore index fc84e5f..1330664 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .DS_Store node_modules npm-debug.log -*.es5.js +index.es5.js diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..833d09d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - stable diff --git a/README.md b/README.md index a079026..8843e75 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# magnifier +# magnifier [![Build Status][travis-image]][travis-url] > Magnifier an image @@ -97,3 +97,6 @@ Forced hide lens. ## License MIT + +[travis-url]: https://travis-ci.org/andrepolischuk/magnifier +[travis-image]: https://travis-ci.org/andrepolischuk/magnifier.svg?branch=master diff --git a/package.json b/package.json index 4674c15..e8a3f60 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,13 @@ }, "devDependencies": { "babel-cli": "^6.9.0", + "babel-eslint": "^6.0.4", "babel-plugin-transform-class-properties": "^6.9.1", "babel-plugin-transform-object-rest-spread": "^6.8.0", "babel-preset-es2015": "^6.9.0", + "eslint": "^2.11.1", + "eslint-config-airbnb-base": "^3.0.1", + "eslint-plugin-import": "^1.8.1", "rimraf": "^2.5.2" }, "main": "index.es5.js", @@ -26,6 +30,7 @@ "index.es5.js" ], "scripts": { + "test": "eslint .", "prepublish": "babel index.js --out-file index.es5.js", "postpublish": "rimraf index.es5.js && git push --follow-tags" },