diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..389a64d --- /dev/null +++ b/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["es2015"], + "plugins": ["transform-runtime", "add-module-exports"] +} diff --git a/.eslintrc b/.eslintrc index 37d6f73..2f05527 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,24 +1,19 @@ { "parser": "babel-eslint", - "env": { - "node": 1, - "browser": 1, - "es6": 1 + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" }, - "globals": { - "angular": 1 + "env": { + "es6": true, + "browser": true, + "node": true }, "rules": { - "quotes": [2, "single", "avoid-escape"], - "eqeqeq": 0, - "yoda": [2, "always"], - "no-use-before-define": 0, - "no-shadow": 0, - "brace-style": [2, "stroustrup"], - "eol-last": 0, - "no-nested-ternary": 1, - "padded-blocks": [1, "never"], - "space-before-function-paren": [1, "never"], - "space-before-blocks": [1, "always"] + "indent": [ 2, 2 ], + "quotes": [ 2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }], + "linebreak-style": [ 2, "unix" ], + "semi": [ 2, "always" ] } } diff --git a/app/sanji-window/index.js b/app/sanji-window/index.js index 9dc9314..ffc7789 100644 --- a/app/sanji-window/index.js +++ b/app/sanji-window/index.js @@ -18,4 +18,4 @@ app.controller('SanjiWindowController', SanjiWindowController); app.controller('SanjiWindowStateController', SanjiWindowStateController); app.component('sanjiWindow', SanjiWindowComponent); app.component('sanjiWindowState', SanjiWindowStateComponent); -export default app = app.name +export default app = app.name; diff --git a/package.json b/package.json index a2f7ded..4a260e3 100644 --- a/package.json +++ b/package.json @@ -26,16 +26,19 @@ "devDependencies": { "angular-mocks": "~1.5.0", "autoprefixer-loader": "~3.2.0", - "babel-core": "~5.8.34", - "babel-eslint": "~4.1.6", - "babel-loader": "~5.3.3", - "babel-runtime": "~5.8.34", + "babel-core": "^6.0.0", + "babel-eslint": "^6.0.4", + "babel-loader": "^6.0.0", + "babel-plugin-add-module-exports": "^0.2.0", + "babel-plugin-transform-runtime": "^6.0.0", + "babel-preset-es2015": "^6.0.0", + "babel-runtime": "^6.6.1", "codecov.io": "~0.1.6", "commitizen": "~2.8.0", "css-loader": "~0.23.0", "cz-conventional-changelog": "~1.1.5", - "eslint": "~1.10.3", - "eslint-loader": "~1.2.1", + "eslint": "^2.0.0", + "eslint-loader": "^1.3.0", "extract-text-webpack-plugin": "~1.0.1", "file-loader": "~0.8.5", "ghooks": "~1.2.0", diff --git a/webpack.config.js b/webpack.config.js index 7b5b1f6..2bd7bf7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -28,7 +28,7 @@ var config = { {test: /\.js$/, loader: "eslint", exclude: /(node_modules)/} ], loaders: [ - {test: /\.js$/, loader: 'ng-annotate!babel', exclude: /(node_modules)/}, + {test: /\.js$/, loader: 'ng-annotate!babel?cacheDirectory', exclude: /(node_modules)/}, {test: /\.html$/, loader: 'ng-cache?prefix=[dir]/[dir]', exclude: /(node_modules)/} ], noParse: []