diff --git a/,eslintrc.json b/,eslintrc.json new file mode 100644 index 00000000..956ebcf5 --- /dev/null +++ b/,eslintrc.json @@ -0,0 +1,15 @@ +{ + "extends": [ + "airbnb/base", + "plugin:dollarshaveclub/ember" + ], + "plugins": [ + "dollarshaveclub" + ], + "globals": { + "Fingerprint": true, + "Flickity": true, + "Modernizr": false, + "Raven": true + } +} diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..8de1c757 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,19 @@ +# /node_modules and /bower_components ignored by default + +# build files +ember-cli-build.js +config/**/* +dist/**/* +lib/**/* +mirage/**/* +server/**/* +scripts/**/* +tests/fixtures/**/* +tmp/**/* +vendor/**/* + +app/router.js +public/assets/js/skrimps.js + +# runs in Phantom, which lacks support for required ES2016 features +tests/blanket-options.js diff --git a/app/mixins/ember-router-scroll.js b/app/mixins/ember-router-scroll.js index 90ff5d84..1f6f761d 100644 --- a/app/mixins/ember-router-scroll.js +++ b/app/mixins/ember-router-scroll.js @@ -1 +1,2 @@ -export { default } from 'ember-router-scroll/mixins/router-scroll'; +import RouterScrollMixin from 'ember-router-scroll/mixins/router-scroll'; +export default RouterScrollMixin; diff --git a/package.json b/package.json index b692bcb3..d70d6fff 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,29 @@ { "name": "ember-router-scroll", - "version": "0.0.0", - "description": "The default blueprint for ember-cli addons.", + "version": "0.0.1", + "description": "Scroll to top with preserved browser history scroll position", "directories": { "doc": "doc", "test": "tests" }, "scripts": { "build": "ember build", + "eslint": "eslint . --ignore-path .eslintignore", "start": "ember server", "test": "ember try:each" }, + "config": { + "pre-git": { + "pre-push": [ + "npm run eslint" + ] + } + }, "repository": "", "engines": { "node": ">= 0.10.0" }, - "author": "", + "author": "Jason Farmer and Benny C. Wong ", "license": "MIT", "devDependencies": { "broccoli-asset-rev": "^2.4.2", @@ -37,10 +45,16 @@ "ember-load-initializers": "^0.5.1", "ember-resolver": "^2.0.3", "ember-welcome-page": "^1.0.1", + "eslint": "^2.4.0", + "eslint-config-airbnb": "^6.1.0", + "eslint-plugin-dollarshaveclub": "^1.0.0", "loader.js": "^4.0.1" }, "keywords": [ - "ember-addon" + "ember-addon", + "ember-router-scroll", + "popstateEvent", + "browser scroll" ], "dependencies": { "ember-cli-babel": "^5.1.6"