From c3c5ec226c795765b9fffe6d18e9cd8ec7aac442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 18:29:10 +0200 Subject: [PATCH 01/25] Add support for webpack-dashboard and NamedModulePlugin * Using webpack-dashboard in dev mode * Adding NamedModulePlugin in dev mode --- config/webpack.dev.js | 20 ++++++++++++++++++++ package.json | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/config/webpack.dev.js b/config/webpack.dev.js index 7442a06b31..a6aa0a8504 100644 --- a/config/webpack.dev.js +++ b/config/webpack.dev.js @@ -9,7 +9,9 @@ const commonConfig = require('./webpack.common.js'); // the settings that are co /** * Webpack Plugins */ +const DashboardPlugin = require('webpack-dashboard/plugin'); const DefinePlugin = require('webpack/lib/DefinePlugin'); +const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin'); /** * Webpack Constants @@ -116,6 +118,24 @@ module.exports = webpackMerge(commonConfig, { 'HMR': METADATA.HMR, } }), + + /** + * Plugin: NamedModulesPlugin (experimental) + * Description: Uses file names as module name. + * + * See: https://github.com/webpack/webpack/commit/a04ffb928365b19feb75087c63f13cadfc08e1eb + */ + new NamedModulesPlugin(), + + /** + * Plugin: DashboardPlugin + * Description: View progress. + * `'It's like to work at NASA.'` + * + * See: https://github.com/FormidableLabs/webpack-dashboard + */ + new DashboardPlugin(), + ], /** diff --git a/package.json b/package.json index 01d8085c3a..bde10a7f27 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --github-dev", "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --github-prod", "server": "npm run server:dev", - "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", + "server:dev": "webpack-dashboard -- webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", "server:dev:hmr": "npm run server:dev -- --inline --hot", "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", @@ -126,6 +126,7 @@ "typescript": "^2.0.0-beta", "url-loader": "^0.5.7", "webpack": "^2.1.0-beta.21", + "webpack-dashboard": "^0.1.8", "webpack-dev-middleware": "^1.6.1", "webpack-dev-server": "^2.1.0-beta.0", "webpack-md5-hash": "^0.0.5", From 3143c175498f8b66a3f75ee36854e18ab6d18632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 18:52:48 +0200 Subject: [PATCH 02/25] Fixing TravisCI with npm >= 3 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2f2729d1ed..e890361bcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,6 @@ before_install: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 + # Updating NPM to relevant version >= 3 on Node.JS LTS + - "npm i -g npm@^3" sudo: false From 3dd655b33edfc616358d65d44568370e114f52ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 19:12:54 +0200 Subject: [PATCH 03/25] Adding .vscode for Chrome Debugger --- .vscode/launch.json | 22 ++++++++++++++++++++++ .vscode/settings.json | 3 +++ README.md | 5 +++++ 3 files changed, 30 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..993feca1e9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Chrome against localhost, with sourcemaps", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "sourceMaps": true, + "webRoot": "${workspaceRoot}" + }, + { + "name": "Attach to Chrome, with sourcemaps", + "type": "chrome", + "request": "attach", + "url": "http://localhost:3000", + "port": 9222, + "sourceMaps": true, + "webRoot": "${workspaceRoot}" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..edce53674c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib/" +} diff --git a/README.md b/README.md index bc7f54cbb4..ef124bec02 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,11 @@ We have good experience using these editors: * [Atom](https://atom.io/) with [TypeScript plugin](https://atom.io/packages/atom-typescript) * [Sublime Text](http://www.sublimetext.com/3) with [Typescript-Sublime-Plugin](https://github.com/Microsoft/Typescript-Sublime-plugin#installation) +### Visual Studio Code + Debugger for Chrome +> Install [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) and see docs for instructions to launch Chrome + +The included `.vscode` automatically connects to the webpack development server on port `3000`. + # Types > When you include a module that doesn't include Type Definitions inside of the module you can include external Type Definitions with @types From 753940b5e1c3c4d8c0d4d1e60cfab69e19475cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 19:34:00 +0200 Subject: [PATCH 04/25] ESLint for all config/**/*.js --- .eslintrc | 137 +++++++++++++++++++++++++++ config/github-deploy/index.js | 6 +- config/head-config.common.js | 40 ++++---- config/html-elements-plugin/index.js | 4 +- config/karma.conf.js | 6 +- config/modules/angular2-hmr-prod.js | 2 +- config/webpack.github-deploy.js | 4 +- config/webpack.prod.js | 2 + package.json | 3 +- 9 files changed, 173 insertions(+), 31 deletions(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000000..89f102c42a --- /dev/null +++ b/.eslintrc @@ -0,0 +1,137 @@ +{ + "ecmaFeatures": { + "modules": true + }, + "env": { + "browser": true, + "node": true, + "es6": true + }, + "rules": { + "no-alert": 2, + "no-array-constructor": 2, + "no-bitwise": 0, + "no-caller": 2, + "no-catch-shadow": 2, + "no-comma-dangle": 0, + "no-cond-assign": 2, + "no-console": 1, + "no-constant-condition": 2, + "no-control-regex": 2, + "no-debugger": 2, + "no-delete-var": 2, + "no-div-regex": 0, + "no-dupe-keys": 2, + "no-else-return": 0, + "no-empty": 2, + "no-empty-character-class": 2, + "no-labels": 2, + "no-eq-null": 0, + "no-eval": 2, + "no-ex-assign": 2, + "no-extend-native": 2, + "no-extra-boolean-cast": 2, + "no-extra-parens": 0, + "no-extra-semi": 2, + "no-fallthrough": 2, + "no-floating-decimal": 0, + "no-func-assign": 2, + "no-global-strict": 0, + "no-implied-eval": 2, + "no-invalid-regexp": 2, + "no-iterator": 2, + "no-label-var": 2, + "no-lone-blocks": 2, + "no-lonely-if": 0, + "no-loop-func": 2, + "no-mixed-requires": [0, false], + "no-multi-str": 2, + "no-native-reassign": 2, + "no-negated-in-lhs": 2, + "no-nested-ternary": 0, + "no-new": 2, + "no-new-func": 2, + "no-new-object": 2, + "no-new-require": 0, + "no-new-wrappers": 2, + "no-obj-calls": 2, + "no-octal": 2, + "no-octal-escape": 2, + "no-path-concat": 0, + "no-plusplus": 0, + "no-process-exit": 2, + "no-proto": 2, + "no-redeclare": 2, + "no-regex-spaces": 2, + "no-restricted-modules": 0, + "no-return-assign": 2, + "no-script-url": 2, + "no-self-compare": 0, + "no-sequences": 2, + "no-shadow": 2, + "no-shadow-restricted-names": 2, + "no-spaced-func": 2, + "semi-spacing": 2, + "no-sparse-arrays": 2, + "no-sync": 0, + "no-ternary": 0, + "no-undef": 2, + "no-undef-init": 2, + "no-underscore-dangle": 2, + "no-unreachable": 2, + "no-unused-expressions": 0, + "no-unused-vars": [1, {"vars": "local", "args": "after-used"}], + "no-use-before-define": 0, + "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], + "no-with": 2, + "yoda": [2, "never"], + "block-scoped-var": 0, + "brace-style": [0, "1tbs"], + "camelcase": 2, + "complexity": [0, 11], + "consistent-return": 2, + "consistent-this": [0, "that"], + "curly": [2, "all"], + "default-case": 0, + "dot-notation": 2, + "eqeqeq": 2, + "func-names": 0, + "func-style": [0, "declaration"], + "guard-for-in": 0, + "max-depth": [0, 4], + "max-len": [0, 80, 4], + "max-nested-callbacks": [0, 2], + "max-params": [0, 3], + "max-statements": [0, 10], + "handle-callback-err": 0, + "new-cap": 0, + "new-parens": 2, + "one-var": 0, + "quote-props": 0, + "quotes": [2, "single", {"allowTemplateLiterals": true}], + "radix": 0, + "semi": 2, + "sort-vars": 0, + "space-after-keywords": [0, "always"], + "space-in-brackets": [0, "never"], + "space-infix-ops": 2, + "keyword-spacing": 2, + "space-unary-word-ops": 0, + "strict": [0, "global"], + "use-isnan": 2, + "valid-jsdoc": 0, + "valid-typeof": 2, + "wrap-iife": 0, + "wrap-regex": 0 + }, + "globals": { + "angular": true, + "browser": true, + "by": true, + "element": true, + "expect": true, + "protractor": true, + "xdescribe": true, + "xit": true + } +} diff --git a/config/github-deploy/index.js b/config/github-deploy/index.js index a8bc10336f..e03899bed0 100644 --- a/config/github-deploy/index.js +++ b/config/github-deploy/index.js @@ -1,7 +1,7 @@ const helpers = require('../helpers'); const execSync = require('child_process').execSync; -const REPO_NAME_RE = /Push URL: https:\/\/github\.com\/.*\/(.*)\.git/; +const REPO_NAME_RE = /Push {2}URL: https:\/\/github\.com\/.*\/(.*)\.git/; function getWebpackConfigModule() { if (helpers.hasProcessFlag('github-dev')) { @@ -32,7 +32,7 @@ function stripTrailing(str, char) { str = str.substr(1); } - if(str.substr(-1) === char) { + if (str.substr(-1) === char) { str = str.substr(0, str.length - 1); } @@ -51,7 +51,7 @@ function stripTrailing(str, char) { */ function safeUrl(url) { const stripped = stripTrailing(url || '', '/'); - return stripped ? stripped + '/' : '' + return stripped ? stripped + '/' : ''; } exports.getWebpackConfigModule = getWebpackConfigModule; diff --git a/config/head-config.common.js b/config/head-config.common.js index 750d805262..ce6dec9d54 100644 --- a/config/head-config.common.js +++ b/config/head-config.common.js @@ -6,40 +6,40 @@ * the same name as the attribute you want to operate on, but prefix with = * * Example: - * { name: "msapplication-TileImage", content: "/assets/icon/ms-icon-144x144.png", "=content": true }, + * { name: 'msapplication-TileImage', content: '/assets/icon/ms-icon-144x144.png', '=content': true }, * Will prefix the publicPath to content. * - * { rel: "apple-touch-icon", sizes: "57x57", href: "/assets/icon/apple-icon-57x57.png", "=href": false }, + * { rel: 'apple-touch-icon', sizes: '57x57', href: '/assets/icon/apple-icon-57x57.png', '=href': false }, * Will not prefix the publicPath on href (href attributes are added by default * */ module.exports = { link: [ - /** tags for "apple-touch-icon" (AKA Web Clips). **/ - { rel: "apple-touch-icon", sizes: "57x57", href: "/assets/icon/apple-icon-57x57.png" }, - { rel: "apple-touch-icon", sizes: "60x60", href: "/assets/icon/apple-icon-60x60.png" }, - { rel: "apple-touch-icon", sizes: "72x72", href: "/assets/icon/apple-icon-72x72.png" }, - { rel: "apple-touch-icon", sizes: "76x76", href: "/assets/icon/apple-icon-76x76.png" }, - { rel: "apple-touch-icon", sizes: "114x114", href: "/assets/icon/apple-icon-114x114.png" }, - { rel: "apple-touch-icon", sizes: "120x120", href: "/assets/icon/apple-icon-120x120.png" }, - { rel: "apple-touch-icon", sizes: "144x144", href: "/assets/icon/apple-icon-144x144.png" }, - { rel: "apple-touch-icon", sizes: "152x152", href: "/assets/icon/apple-icon-152x152.png" }, - { rel: "apple-touch-icon", sizes: "180x180", href: "/assets/icon/apple-icon-180x180.png" }, + /** tags for 'apple-touch-icon' (AKA Web Clips). **/ + { rel: 'apple-touch-icon', sizes: '57x57', href: '/assets/icon/apple-icon-57x57.png' }, + { rel: 'apple-touch-icon', sizes: '60x60', href: '/assets/icon/apple-icon-60x60.png' }, + { rel: 'apple-touch-icon', sizes: '72x72', href: '/assets/icon/apple-icon-72x72.png' }, + { rel: 'apple-touch-icon', sizes: '76x76', href: '/assets/icon/apple-icon-76x76.png' }, + { rel: 'apple-touch-icon', sizes: '114x114', href: '/assets/icon/apple-icon-114x114.png' }, + { rel: 'apple-touch-icon', sizes: '120x120', href: '/assets/icon/apple-icon-120x120.png' }, + { rel: 'apple-touch-icon', sizes: '144x144', href: '/assets/icon/apple-icon-144x144.png' }, + { rel: 'apple-touch-icon', sizes: '152x152', href: '/assets/icon/apple-icon-152x152.png' }, + { rel: 'apple-touch-icon', sizes: '180x180', href: '/assets/icon/apple-icon-180x180.png' }, /** tags for android web app icons **/ - { rel: "icon", type: "image/png", sizes: "192x192", href: "/assets/icon/android-icon-192x192.png" }, + { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/assets/icon/android-icon-192x192.png' }, /** tags for favicons **/ - { rel: "icon", type: "image/png", sizes: "32x32", href: "/assets/icon/favicon-32x32.png" }, - { rel: "icon", type: "image/png", sizes: "96x96", href: "/assets/icon/favicon-96x96.png" }, - { rel: "icon", type: "image/png", sizes: "16x16", href: "/assets/icon/favicon-16x16.png" }, + { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/assets/icon/favicon-32x32.png' }, + { rel: 'icon', type: 'image/png', sizes: '96x96', href: '/assets/icon/favicon-96x96.png' }, + { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/assets/icon/favicon-16x16.png' }, /** tags for a Web App Manifest **/ - { rel: "manifest", href: "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/assets/manifest.json" } + { rel: 'manifest', href: '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/assets/manifest.json' } ], meta: [ - { name: "msapplication-TileColor", content: "#00bcd4" }, - { name: "msapplication-TileImage", content: "/assets/icon/ms-icon-144x144.png", "=content": true }, - { name: "theme-color", content: "#00bcd4" } + { name: 'msapplication-TileColor', content: '#00bcd4' }, + { name: 'msapplication-TileImage', content: '/assets/icon/ms-icon-144x144.png', '=content': true }, + { name: 'theme-color', content: '#00bcd4' } ] }; diff --git a/config/html-elements-plugin/index.js b/config/html-elements-plugin/index.js index b6c1e1d679..5766a2fdbb 100644 --- a/config/html-elements-plugin/index.js +++ b/config/html-elements-plugin/index.js @@ -43,7 +43,9 @@ function createTag(tagName, attrMap, publicPath) { publicPath = publicPath || ''; // add trailing slash if we have a publicPath and it doesn't have one. - if (publicPath && !RE_ENDS_WITH_BS.test(publicPath)) publicPath += '/'; + if (publicPath && !RE_ENDS_WITH_BS.test(publicPath)) { + publicPath += '/'; + } const attributes = Object.getOwnPropertyNames(attrMap) .filter(function(name) { return name[0] !== '='; } ) diff --git a/config/karma.conf.js b/config/karma.conf.js index 7759587c03..b6a86d0907 100644 --- a/config/karma.conf.js +++ b/config/karma.conf.js @@ -80,7 +80,7 @@ module.exports = function(config) { ], customLaunchers: { - Chrome_travis_ci: { + ChromeTravisCi: { base: 'Chrome', flags: ['--no-sandbox'] } @@ -93,8 +93,8 @@ module.exports = function(config) { singleRun: true }; - if(process.env.TRAVIS){ - configuration.browsers = ['Chrome_travis_ci']; + if (process.env.TRAVIS){ + configuration.browsers = ['ChromeTravisCi']; } config.set(configuration); diff --git a/config/modules/angular2-hmr-prod.js b/config/modules/angular2-hmr-prod.js index 105f9f6552..26fce4699f 100644 --- a/config/modules/angular2-hmr-prod.js +++ b/config/modules/angular2-hmr-prod.js @@ -1,3 +1,3 @@ exports.HmrState = function() { -} +}; diff --git a/config/webpack.github-deploy.js b/config/webpack.github-deploy.js index 05978aee03..5ad45191b0 100644 --- a/config/webpack.github-deploy.js +++ b/config/webpack.github-deploy.js @@ -52,7 +52,7 @@ module.exports = webpackMerge(webpackConfig, { plugins: [ function() { - this.plugin("done", function(stats) { + this.plugin('done', function(stats) { console.log('Starting deployment to GitHub.'); const logger = function (msg) { @@ -73,7 +73,7 @@ module.exports = webpackMerge(webpackConfig, { console.log('GitHub deployment done. STATUS: SUCCESS.'); } }); - }) + }); } ] }); diff --git a/config/webpack.prod.js b/config/webpack.prod.js index 1f2ec53c5e..9442c08366 100644 --- a/config/webpack.prod.js +++ b/config/webpack.prod.js @@ -157,8 +157,10 @@ module.exports = webpackMerge(commonConfig, { beautify: false, //prod + /* eslint-disable camelcase */ mangle: { screw_ie8 : true }, //prod compress: { screw_ie8: true }, //prod + /* eslint-enable camelcase */ comments: false //prod }), diff --git a/package.json b/package.json index bde10a7f27..6a5cff36b3 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "scripts": { "rimraf": "rimraf", "tslint": "tslint", + "eslint": "eslint", "typedoc": "typedoc", "webpack": "webpack", "webpack-dev-server": "webpack-dev-server", @@ -43,7 +44,7 @@ "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", - "lint": "npm run tslint \"src/**/*.ts\"", + "lint": "npm run tslint \"src/**/*.ts\" && npm run \"config/**/*.js\"", "pree2e": "npm run webdriver:update -- --standalone", "e2e": "npm run protractor", "e2e:live": "npm run e2e -- --elementExplorer", From b7002a34e15ab7f8d93449807c9d8eed83f7ec13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 09:52:40 +0200 Subject: [PATCH 05/25] ~ updating deps in dev --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6a5cff36b3..bcd6e6b59a 100644 --- a/package.json +++ b/package.json @@ -83,14 +83,14 @@ "@types/core-js": "^0.9.28", "@types/hammerjs": "^2.0.28", "@types/jasmine": "^2.2.29", - "@types/node": "^4.0.29", + "@types/node": "^6.0.38", "@types/protractor": "^1.5.16", "@types/selenium-webdriver": "^2.44.26", "@types/source-map": "^0.1.26", "@types/uglify-js": "^2.0.27", "@types/webpack": "^1.12.29", "angular2-hmr": "~0.8.0", - "awesome-typescript-loader": "1.1.1", + "awesome-typescript-loader": "^2.2.1", "codelyzer": "~0.0.21", "copy-webpack-plugin": "^3.0.1", "css-loader": "^0.24.0", @@ -104,12 +104,12 @@ "istanbul-instrumenter-loader": "^0.2.0", "json-loader": "^0.5.4", "karma": "^0.13.22", - "karma-chrome-launcher": "^1.0.1", + "karma-chrome-launcher": "^2.0.0 ", "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.0", "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "1.7.0", + "karma-webpack": "1.8.0", "parse5": "^1.5.1", "protractor": "^3.2.2", "raw-loader": "0.5.1", @@ -120,7 +120,7 @@ "style-loader": "^0.13.1", "to-string-loader": "^1.1.4", "ts-helpers": "1.1.1", - "ts-node": "^0.9.1", + "ts-node": "^1.3.0", "tslint": "^3.7.1", "tslint-loader": "^2.1.3", "typedoc": "^0.4.4", From 8bd4ab47445d8a00d5e83c47e4dc0412d029b543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 10:09:53 +0200 Subject: [PATCH 06/25] ~ fixing eslint and tslint --- package.json | 4 ++-- src/app/+detail/index.ts | 2 +- src/app/app.module.ts | 8 ++++---- src/app/environment.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index bcd6e6b59a..71fbc4465b 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", - "lint": "npm run tslint \"src/**/*.ts\" && npm run \"config/**/*.js\"", + "lint": "npm run tslint \"src/**/*.ts\" && npm run eslint \"config/**/*.js\"", "pree2e": "npm run webdriver:update -- --standalone", "e2e": "npm run protractor", "e2e:live": "npm run e2e -- --elementExplorer", @@ -121,7 +121,7 @@ "to-string-loader": "^1.1.4", "ts-helpers": "1.1.1", "ts-node": "^1.3.0", - "tslint": "^3.7.1", + "tslint": "^3.15.1", "tslint-loader": "^2.1.3", "typedoc": "^0.4.4", "typescript": "^2.0.0-beta", diff --git a/src/app/+detail/index.ts b/src/app/+detail/index.ts index e7e720c3eb..3f2c745384 100644 --- a/src/app/+detail/index.ts +++ b/src/app/+detail/index.ts @@ -1,4 +1,4 @@ -import { BrowserModule } from '@angular/platform-browser' +import { BrowserModule } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1ede98c666..2bcd264b5b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -56,17 +56,17 @@ export class AppModule { delete store.state; } hmrOnDestroy(store) { - var cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement); + const cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement); // recreate elements - var state = this.appState._state; + const state = this.appState._state; store.state = state; - store.disposeOldHosts = createNewHosts(cmpLocation) + store.disposeOldHosts = createNewHosts(cmpLocation); // remove styles removeNgStyles(); } hmrAfterDestroy(store) { // display new elements - store.disposeOldHosts() + store.disposeOldHosts(); delete store.disposeOldHosts; } } diff --git a/src/app/environment.ts b/src/app/environment.ts index 80cdb1e291..8bba89c4ec 100644 --- a/src/app/environment.ts +++ b/src/app/environment.ts @@ -25,14 +25,14 @@ if ('production' === ENV) { } else { _decorateModuleRef = (modRef: any) => { - var appRef = modRef.injector.get(ApplicationRef); - var cmpRef = appRef.components[0]; + const appRef = modRef.injector.get(ApplicationRef); + const cmpRef = appRef.components[0]; let _ng = (window).ng; enableDebugTools(cmpRef); (window).ng.probe = _ng.probe; (window).ng.coreTokens = _ng.coreTokens; - return modRef + return modRef; }; // Development From b83465655518e66d5c1ff8b01d4025f6bda4f621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 10:27:17 +0200 Subject: [PATCH 07/25] ~ updating TSLint to @next --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71fbc4465b..0237c6b66a 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "to-string-loader": "^1.1.4", "ts-helpers": "1.1.1", "ts-node": "^1.3.0", - "tslint": "^3.15.1", + "tslint": "^3.15.0-dev.0", "tslint-loader": "^2.1.3", "typedoc": "^0.4.4", "typescript": "^2.0.0-beta", From c16aa914620d4f3ea628b2bb9250c75c4c7d68ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 13:34:25 +0200 Subject: [PATCH 08/25] ~ removing conflicting @types/core-js definitions --- tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 02658dab1c..c4e2a88047 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,6 @@ "es6" ], "types": [ - "core-js", "hammerjs", "jasmine", "node", From e2552b8dc7f98e0abc9f2c4a9063c86d093ae0e6 Mon Sep 17 00:00:00 2001 From: Christophe Vidal Date: Mon, 29 Aug 2016 05:38:55 +0200 Subject: [PATCH 09/25] fix: Update webpack.prod.js (#920) Temporary Fix for RC5. See https://github.com/angular/angular/issues/10618 --- config/webpack.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/webpack.prod.js b/config/webpack.prod.js index 1f2ec53c5e..aaee9dedfc 100644 --- a/config/webpack.prod.js +++ b/config/webpack.prod.js @@ -157,7 +157,7 @@ module.exports = webpackMerge(commonConfig, { beautify: false, //prod - mangle: { screw_ie8 : true }, //prod + mangle: { screw_ie8 : true, keep_fnames: true }, //prod compress: { screw_ie8: true }, //prod comments: false //prod }), From f083350aacc88b242e407c0d995e3a5fbcd0eff6 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Mon, 29 Aug 2016 07:51:50 +0200 Subject: [PATCH 10/25] chore(package): update es6-promise-loader to version 1.0.2 (#893) https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 01d8085c3a..2bbbe10404 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "codelyzer": "~0.0.21", "copy-webpack-plugin": "^3.0.1", "css-loader": "^0.24.0", - "es6-promise-loader": "^1.0.1", + "es6-promise-loader": "^1.0.2", "exports-loader": "^0.6.3", "expose-loader": "^0.7.1", "file-loader": "^0.9.0", From c86da57232c177775c84787f1f2cc0946e3fbc1a Mon Sep 17 00:00:00 2001 From: PatrickJS Date: Sun, 28 Aug 2016 22:52:45 -0700 Subject: [PATCH 11/25] chore: remove es6-promise-loader for System.import --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 2bbbe10404..e7c30c8a47 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,6 @@ "codelyzer": "~0.0.21", "copy-webpack-plugin": "^3.0.1", "css-loader": "^0.24.0", - "es6-promise-loader": "^1.0.2", "exports-loader": "^0.6.3", "expose-loader": "^0.7.1", "file-loader": "^0.9.0", From 50ac837d77175fe3492d55290655997b29c751c1 Mon Sep 17 00:00:00 2001 From: Frederick Cai Date: Mon, 29 Aug 2016 19:01:32 +1200 Subject: [PATCH 12/25] chore(package): move angular2-template-loader to devDependencies (#909) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e7c30c8a47..1d947c3735 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "@angularclass/webpack-toolkit": "^1.3.3", "@angularclass/request-idle-callback": "^1.0.7", "@angularclass/conventions-loader": "^1.0.2", - "angular2-template-loader": "^0.5.0", "ie-shim": "^0.1.0", "core-js": "^2.4.0", "rxjs": "5.0.0-beta.6", @@ -89,6 +88,7 @@ "@types/uglify-js": "^2.0.27", "@types/webpack": "^1.12.29", "angular2-hmr": "~0.8.0", + "angular2-template-loader": "^0.5.0", "awesome-typescript-loader": "1.1.1", "codelyzer": "~0.0.21", "copy-webpack-plugin": "^3.0.1", From 7bbadf1dbedf455503e421184b23379ad433f4f9 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Mon, 29 Aug 2016 09:01:46 +0200 Subject: [PATCH 13/25] chore(package): update tslint to version 3.15.1 (#883) https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1d947c3735..f21288ae52 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "to-string-loader": "^1.1.4", "ts-helpers": "1.1.1", "ts-node": "^0.9.1", - "tslint": "^3.7.1", + "tslint": "^3.15.1", "tslint-loader": "^2.1.3", "typedoc": "^0.4.4", "typescript": "^2.0.0-beta", From 27842808a6b0e371b4a4a841e77a88a06931688e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Mon, 29 Aug 2016 09:17:50 +0200 Subject: [PATCH 14/25] ~ remove eslint and webpack-dashboard --- .editorconfig | 16 ---------------- config/webpack.dev.js | 10 ---------- package.json | 6 ++---- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 869ff6c553..0000000000 --- a/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -# @AngularClass -# http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -insert_final_newline = false -trim_trailing_whitespace = false diff --git a/config/webpack.dev.js b/config/webpack.dev.js index a6aa0a8504..6252e897a3 100644 --- a/config/webpack.dev.js +++ b/config/webpack.dev.js @@ -9,7 +9,6 @@ const commonConfig = require('./webpack.common.js'); // the settings that are co /** * Webpack Plugins */ -const DashboardPlugin = require('webpack-dashboard/plugin'); const DefinePlugin = require('webpack/lib/DefinePlugin'); const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin'); @@ -127,15 +126,6 @@ module.exports = webpackMerge(commonConfig, { */ new NamedModulesPlugin(), - /** - * Plugin: DashboardPlugin - * Description: View progress. - * `'It's like to work at NASA.'` - * - * See: https://github.com/FormidableLabs/webpack-dashboard - */ - new DashboardPlugin(), - ], /** diff --git a/package.json b/package.json index 0237c6b66a..8bfd7e3db0 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "scripts": { "rimraf": "rimraf", "tslint": "tslint", - "eslint": "eslint", "typedoc": "typedoc", "webpack": "webpack", "webpack-dev-server": "webpack-dev-server", @@ -39,12 +38,12 @@ "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --github-dev", "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --github-prod", "server": "npm run server:dev", - "server:dev": "webpack-dashboard -- webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", + "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", "server:dev:hmr": "npm run server:dev -- --inline --hot", "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", - "lint": "npm run tslint \"src/**/*.ts\" && npm run eslint \"config/**/*.js\"", + "lint": "npm run tslint \"src/**/*.ts\"", "pree2e": "npm run webdriver:update -- --standalone", "e2e": "npm run protractor", "e2e:live": "npm run e2e -- --elementExplorer", @@ -127,7 +126,6 @@ "typescript": "^2.0.0-beta", "url-loader": "^0.5.7", "webpack": "^2.1.0-beta.21", - "webpack-dashboard": "^0.1.8", "webpack-dev-middleware": "^1.6.1", "webpack-dev-server": "^2.1.0-beta.0", "webpack-md5-hash": "^0.0.5", From 52badcebd964f0e3ab15cddd0b0399b00d8c708c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Mon, 29 Aug 2016 09:21:18 +0200 Subject: [PATCH 15/25] ~ reverting minor failure --- .editorconfig | 16 ++++++ .eslintrc | 137 -------------------------------------------------- 2 files changed, 16 insertions(+), 137 deletions(-) create mode 100644 .editorconfig delete mode 100644 .eslintrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..869ff6c553 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# @AngularClass +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 89f102c42a..0000000000 --- a/.eslintrc +++ /dev/null @@ -1,137 +0,0 @@ -{ - "ecmaFeatures": { - "modules": true - }, - "env": { - "browser": true, - "node": true, - "es6": true - }, - "rules": { - "no-alert": 2, - "no-array-constructor": 2, - "no-bitwise": 0, - "no-caller": 2, - "no-catch-shadow": 2, - "no-comma-dangle": 0, - "no-cond-assign": 2, - "no-console": 1, - "no-constant-condition": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-div-regex": 0, - "no-dupe-keys": 2, - "no-else-return": 0, - "no-empty": 2, - "no-empty-character-class": 2, - "no-labels": 2, - "no-eq-null": 0, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": 0, - "no-extra-semi": 2, - "no-fallthrough": 2, - "no-floating-decimal": 0, - "no-func-assign": 2, - "no-global-strict": 0, - "no-implied-eval": 2, - "no-invalid-regexp": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-lone-blocks": 2, - "no-lonely-if": 0, - "no-loop-func": 2, - "no-mixed-requires": [0, false], - "no-multi-str": 2, - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-nested-ternary": 0, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 0, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-path-concat": 0, - "no-plusplus": 0, - "no-process-exit": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-restricted-modules": 0, - "no-return-assign": 2, - "no-script-url": 2, - "no-self-compare": 0, - "no-sequences": 2, - "no-shadow": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "semi-spacing": 2, - "no-sparse-arrays": 2, - "no-sync": 0, - "no-ternary": 0, - "no-undef": 2, - "no-undef-init": 2, - "no-underscore-dangle": 2, - "no-unreachable": 2, - "no-unused-expressions": 0, - "no-unused-vars": [1, {"vars": "local", "args": "after-used"}], - "no-use-before-define": 0, - "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], - "no-with": 2, - "yoda": [2, "never"], - "block-scoped-var": 0, - "brace-style": [0, "1tbs"], - "camelcase": 2, - "complexity": [0, 11], - "consistent-return": 2, - "consistent-this": [0, "that"], - "curly": [2, "all"], - "default-case": 0, - "dot-notation": 2, - "eqeqeq": 2, - "func-names": 0, - "func-style": [0, "declaration"], - "guard-for-in": 0, - "max-depth": [0, 4], - "max-len": [0, 80, 4], - "max-nested-callbacks": [0, 2], - "max-params": [0, 3], - "max-statements": [0, 10], - "handle-callback-err": 0, - "new-cap": 0, - "new-parens": 2, - "one-var": 0, - "quote-props": 0, - "quotes": [2, "single", {"allowTemplateLiterals": true}], - "radix": 0, - "semi": 2, - "sort-vars": 0, - "space-after-keywords": [0, "always"], - "space-in-brackets": [0, "never"], - "space-infix-ops": 2, - "keyword-spacing": 2, - "space-unary-word-ops": 0, - "strict": [0, "global"], - "use-isnan": 2, - "valid-jsdoc": 0, - "valid-typeof": 2, - "wrap-iife": 0, - "wrap-regex": 0 - }, - "globals": { - "angular": true, - "browser": true, - "by": true, - "element": true, - "expect": true, - "protractor": true, - "xdescribe": true, - "xit": true - } -} From 65e04a5439bfc6ab124a00bcdea78c57443a10d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 18:29:10 +0200 Subject: [PATCH 16/25] Add support for webpack-dashboard and NamedModulePlugin * Using webpack-dashboard in dev mode * Adding NamedModulePlugin in dev mode --- config/webpack.dev.js | 20 ++++++++++++++++++++ package.json | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/config/webpack.dev.js b/config/webpack.dev.js index 7442a06b31..a6aa0a8504 100644 --- a/config/webpack.dev.js +++ b/config/webpack.dev.js @@ -9,7 +9,9 @@ const commonConfig = require('./webpack.common.js'); // the settings that are co /** * Webpack Plugins */ +const DashboardPlugin = require('webpack-dashboard/plugin'); const DefinePlugin = require('webpack/lib/DefinePlugin'); +const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin'); /** * Webpack Constants @@ -116,6 +118,24 @@ module.exports = webpackMerge(commonConfig, { 'HMR': METADATA.HMR, } }), + + /** + * Plugin: NamedModulesPlugin (experimental) + * Description: Uses file names as module name. + * + * See: https://github.com/webpack/webpack/commit/a04ffb928365b19feb75087c63f13cadfc08e1eb + */ + new NamedModulesPlugin(), + + /** + * Plugin: DashboardPlugin + * Description: View progress. + * `'It's like to work at NASA.'` + * + * See: https://github.com/FormidableLabs/webpack-dashboard + */ + new DashboardPlugin(), + ], /** diff --git a/package.json b/package.json index f21288ae52..15f403c394 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --github-dev", "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --github-prod", "server": "npm run server:dev", - "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", + "server:dev": "webpack-dashboard -- webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", "server:dev:hmr": "npm run server:dev -- --inline --hot", "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", @@ -125,6 +125,7 @@ "typescript": "^2.0.0-beta", "url-loader": "^0.5.7", "webpack": "^2.1.0-beta.21", + "webpack-dashboard": "^0.1.8", "webpack-dev-middleware": "^1.6.1", "webpack-dev-server": "^2.1.0-beta.0", "webpack-md5-hash": "^0.0.5", From 63b241953f9bf9d5c70fbb787b5738db7191989e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 18:52:48 +0200 Subject: [PATCH 17/25] Fixing TravisCI with npm >= 3 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2f2729d1ed..e890361bcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,6 @@ before_install: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 + # Updating NPM to relevant version >= 3 on Node.JS LTS + - "npm i -g npm@^3" sudo: false From ee24dc2cdc30617005464eea2da95f405bba81a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 19:12:54 +0200 Subject: [PATCH 18/25] Adding .vscode for Chrome Debugger --- .vscode/launch.json | 22 ++++++++++++++++++++++ .vscode/settings.json | 3 +++ README.md | 5 +++++ 3 files changed, 30 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..993feca1e9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Chrome against localhost, with sourcemaps", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "sourceMaps": true, + "webRoot": "${workspaceRoot}" + }, + { + "name": "Attach to Chrome, with sourcemaps", + "type": "chrome", + "request": "attach", + "url": "http://localhost:3000", + "port": 9222, + "sourceMaps": true, + "webRoot": "${workspaceRoot}" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..edce53674c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib/" +} diff --git a/README.md b/README.md index bc7f54cbb4..ef124bec02 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,11 @@ We have good experience using these editors: * [Atom](https://atom.io/) with [TypeScript plugin](https://atom.io/packages/atom-typescript) * [Sublime Text](http://www.sublimetext.com/3) with [Typescript-Sublime-Plugin](https://github.com/Microsoft/Typescript-Sublime-plugin#installation) +### Visual Studio Code + Debugger for Chrome +> Install [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) and see docs for instructions to launch Chrome + +The included `.vscode` automatically connects to the webpack development server on port `3000`. + # Types > When you include a module that doesn't include Type Definitions inside of the module you can include external Type Definitions with @types From f1bc961cb9b78be91ebf3896e4bcabb0d5db448b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sat, 27 Aug 2016 19:34:00 +0200 Subject: [PATCH 19/25] ESLint for all config/**/*.js --- .eslintrc | 137 +++++++++++++++++++++++++++ config/github-deploy/index.js | 6 +- config/head-config.common.js | 40 ++++---- config/html-elements-plugin/index.js | 4 +- config/karma.conf.js | 6 +- config/modules/angular2-hmr-prod.js | 2 +- config/webpack.github-deploy.js | 4 +- package.json | 3 +- 8 files changed, 171 insertions(+), 31 deletions(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000000..89f102c42a --- /dev/null +++ b/.eslintrc @@ -0,0 +1,137 @@ +{ + "ecmaFeatures": { + "modules": true + }, + "env": { + "browser": true, + "node": true, + "es6": true + }, + "rules": { + "no-alert": 2, + "no-array-constructor": 2, + "no-bitwise": 0, + "no-caller": 2, + "no-catch-shadow": 2, + "no-comma-dangle": 0, + "no-cond-assign": 2, + "no-console": 1, + "no-constant-condition": 2, + "no-control-regex": 2, + "no-debugger": 2, + "no-delete-var": 2, + "no-div-regex": 0, + "no-dupe-keys": 2, + "no-else-return": 0, + "no-empty": 2, + "no-empty-character-class": 2, + "no-labels": 2, + "no-eq-null": 0, + "no-eval": 2, + "no-ex-assign": 2, + "no-extend-native": 2, + "no-extra-boolean-cast": 2, + "no-extra-parens": 0, + "no-extra-semi": 2, + "no-fallthrough": 2, + "no-floating-decimal": 0, + "no-func-assign": 2, + "no-global-strict": 0, + "no-implied-eval": 2, + "no-invalid-regexp": 2, + "no-iterator": 2, + "no-label-var": 2, + "no-lone-blocks": 2, + "no-lonely-if": 0, + "no-loop-func": 2, + "no-mixed-requires": [0, false], + "no-multi-str": 2, + "no-native-reassign": 2, + "no-negated-in-lhs": 2, + "no-nested-ternary": 0, + "no-new": 2, + "no-new-func": 2, + "no-new-object": 2, + "no-new-require": 0, + "no-new-wrappers": 2, + "no-obj-calls": 2, + "no-octal": 2, + "no-octal-escape": 2, + "no-path-concat": 0, + "no-plusplus": 0, + "no-process-exit": 2, + "no-proto": 2, + "no-redeclare": 2, + "no-regex-spaces": 2, + "no-restricted-modules": 0, + "no-return-assign": 2, + "no-script-url": 2, + "no-self-compare": 0, + "no-sequences": 2, + "no-shadow": 2, + "no-shadow-restricted-names": 2, + "no-spaced-func": 2, + "semi-spacing": 2, + "no-sparse-arrays": 2, + "no-sync": 0, + "no-ternary": 0, + "no-undef": 2, + "no-undef-init": 2, + "no-underscore-dangle": 2, + "no-unreachable": 2, + "no-unused-expressions": 0, + "no-unused-vars": [1, {"vars": "local", "args": "after-used"}], + "no-use-before-define": 0, + "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], + "no-with": 2, + "yoda": [2, "never"], + "block-scoped-var": 0, + "brace-style": [0, "1tbs"], + "camelcase": 2, + "complexity": [0, 11], + "consistent-return": 2, + "consistent-this": [0, "that"], + "curly": [2, "all"], + "default-case": 0, + "dot-notation": 2, + "eqeqeq": 2, + "func-names": 0, + "func-style": [0, "declaration"], + "guard-for-in": 0, + "max-depth": [0, 4], + "max-len": [0, 80, 4], + "max-nested-callbacks": [0, 2], + "max-params": [0, 3], + "max-statements": [0, 10], + "handle-callback-err": 0, + "new-cap": 0, + "new-parens": 2, + "one-var": 0, + "quote-props": 0, + "quotes": [2, "single", {"allowTemplateLiterals": true}], + "radix": 0, + "semi": 2, + "sort-vars": 0, + "space-after-keywords": [0, "always"], + "space-in-brackets": [0, "never"], + "space-infix-ops": 2, + "keyword-spacing": 2, + "space-unary-word-ops": 0, + "strict": [0, "global"], + "use-isnan": 2, + "valid-jsdoc": 0, + "valid-typeof": 2, + "wrap-iife": 0, + "wrap-regex": 0 + }, + "globals": { + "angular": true, + "browser": true, + "by": true, + "element": true, + "expect": true, + "protractor": true, + "xdescribe": true, + "xit": true + } +} diff --git a/config/github-deploy/index.js b/config/github-deploy/index.js index a8bc10336f..e03899bed0 100644 --- a/config/github-deploy/index.js +++ b/config/github-deploy/index.js @@ -1,7 +1,7 @@ const helpers = require('../helpers'); const execSync = require('child_process').execSync; -const REPO_NAME_RE = /Push URL: https:\/\/github\.com\/.*\/(.*)\.git/; +const REPO_NAME_RE = /Push {2}URL: https:\/\/github\.com\/.*\/(.*)\.git/; function getWebpackConfigModule() { if (helpers.hasProcessFlag('github-dev')) { @@ -32,7 +32,7 @@ function stripTrailing(str, char) { str = str.substr(1); } - if(str.substr(-1) === char) { + if (str.substr(-1) === char) { str = str.substr(0, str.length - 1); } @@ -51,7 +51,7 @@ function stripTrailing(str, char) { */ function safeUrl(url) { const stripped = stripTrailing(url || '', '/'); - return stripped ? stripped + '/' : '' + return stripped ? stripped + '/' : ''; } exports.getWebpackConfigModule = getWebpackConfigModule; diff --git a/config/head-config.common.js b/config/head-config.common.js index 750d805262..ce6dec9d54 100644 --- a/config/head-config.common.js +++ b/config/head-config.common.js @@ -6,40 +6,40 @@ * the same name as the attribute you want to operate on, but prefix with = * * Example: - * { name: "msapplication-TileImage", content: "/assets/icon/ms-icon-144x144.png", "=content": true }, + * { name: 'msapplication-TileImage', content: '/assets/icon/ms-icon-144x144.png', '=content': true }, * Will prefix the publicPath to content. * - * { rel: "apple-touch-icon", sizes: "57x57", href: "/assets/icon/apple-icon-57x57.png", "=href": false }, + * { rel: 'apple-touch-icon', sizes: '57x57', href: '/assets/icon/apple-icon-57x57.png', '=href': false }, * Will not prefix the publicPath on href (href attributes are added by default * */ module.exports = { link: [ - /** tags for "apple-touch-icon" (AKA Web Clips). **/ - { rel: "apple-touch-icon", sizes: "57x57", href: "/assets/icon/apple-icon-57x57.png" }, - { rel: "apple-touch-icon", sizes: "60x60", href: "/assets/icon/apple-icon-60x60.png" }, - { rel: "apple-touch-icon", sizes: "72x72", href: "/assets/icon/apple-icon-72x72.png" }, - { rel: "apple-touch-icon", sizes: "76x76", href: "/assets/icon/apple-icon-76x76.png" }, - { rel: "apple-touch-icon", sizes: "114x114", href: "/assets/icon/apple-icon-114x114.png" }, - { rel: "apple-touch-icon", sizes: "120x120", href: "/assets/icon/apple-icon-120x120.png" }, - { rel: "apple-touch-icon", sizes: "144x144", href: "/assets/icon/apple-icon-144x144.png" }, - { rel: "apple-touch-icon", sizes: "152x152", href: "/assets/icon/apple-icon-152x152.png" }, - { rel: "apple-touch-icon", sizes: "180x180", href: "/assets/icon/apple-icon-180x180.png" }, + /** tags for 'apple-touch-icon' (AKA Web Clips). **/ + { rel: 'apple-touch-icon', sizes: '57x57', href: '/assets/icon/apple-icon-57x57.png' }, + { rel: 'apple-touch-icon', sizes: '60x60', href: '/assets/icon/apple-icon-60x60.png' }, + { rel: 'apple-touch-icon', sizes: '72x72', href: '/assets/icon/apple-icon-72x72.png' }, + { rel: 'apple-touch-icon', sizes: '76x76', href: '/assets/icon/apple-icon-76x76.png' }, + { rel: 'apple-touch-icon', sizes: '114x114', href: '/assets/icon/apple-icon-114x114.png' }, + { rel: 'apple-touch-icon', sizes: '120x120', href: '/assets/icon/apple-icon-120x120.png' }, + { rel: 'apple-touch-icon', sizes: '144x144', href: '/assets/icon/apple-icon-144x144.png' }, + { rel: 'apple-touch-icon', sizes: '152x152', href: '/assets/icon/apple-icon-152x152.png' }, + { rel: 'apple-touch-icon', sizes: '180x180', href: '/assets/icon/apple-icon-180x180.png' }, /** tags for android web app icons **/ - { rel: "icon", type: "image/png", sizes: "192x192", href: "/assets/icon/android-icon-192x192.png" }, + { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/assets/icon/android-icon-192x192.png' }, /** tags for favicons **/ - { rel: "icon", type: "image/png", sizes: "32x32", href: "/assets/icon/favicon-32x32.png" }, - { rel: "icon", type: "image/png", sizes: "96x96", href: "/assets/icon/favicon-96x96.png" }, - { rel: "icon", type: "image/png", sizes: "16x16", href: "/assets/icon/favicon-16x16.png" }, + { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/assets/icon/favicon-32x32.png' }, + { rel: 'icon', type: 'image/png', sizes: '96x96', href: '/assets/icon/favicon-96x96.png' }, + { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/assets/icon/favicon-16x16.png' }, /** tags for a Web App Manifest **/ - { rel: "manifest", href: "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/assets/manifest.json" } + { rel: 'manifest', href: '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/assets/manifest.json' } ], meta: [ - { name: "msapplication-TileColor", content: "#00bcd4" }, - { name: "msapplication-TileImage", content: "/assets/icon/ms-icon-144x144.png", "=content": true }, - { name: "theme-color", content: "#00bcd4" } + { name: 'msapplication-TileColor', content: '#00bcd4' }, + { name: 'msapplication-TileImage', content: '/assets/icon/ms-icon-144x144.png', '=content': true }, + { name: 'theme-color', content: '#00bcd4' } ] }; diff --git a/config/html-elements-plugin/index.js b/config/html-elements-plugin/index.js index b6c1e1d679..5766a2fdbb 100644 --- a/config/html-elements-plugin/index.js +++ b/config/html-elements-plugin/index.js @@ -43,7 +43,9 @@ function createTag(tagName, attrMap, publicPath) { publicPath = publicPath || ''; // add trailing slash if we have a publicPath and it doesn't have one. - if (publicPath && !RE_ENDS_WITH_BS.test(publicPath)) publicPath += '/'; + if (publicPath && !RE_ENDS_WITH_BS.test(publicPath)) { + publicPath += '/'; + } const attributes = Object.getOwnPropertyNames(attrMap) .filter(function(name) { return name[0] !== '='; } ) diff --git a/config/karma.conf.js b/config/karma.conf.js index 7759587c03..b6a86d0907 100644 --- a/config/karma.conf.js +++ b/config/karma.conf.js @@ -80,7 +80,7 @@ module.exports = function(config) { ], customLaunchers: { - Chrome_travis_ci: { + ChromeTravisCi: { base: 'Chrome', flags: ['--no-sandbox'] } @@ -93,8 +93,8 @@ module.exports = function(config) { singleRun: true }; - if(process.env.TRAVIS){ - configuration.browsers = ['Chrome_travis_ci']; + if (process.env.TRAVIS){ + configuration.browsers = ['ChromeTravisCi']; } config.set(configuration); diff --git a/config/modules/angular2-hmr-prod.js b/config/modules/angular2-hmr-prod.js index 105f9f6552..26fce4699f 100644 --- a/config/modules/angular2-hmr-prod.js +++ b/config/modules/angular2-hmr-prod.js @@ -1,3 +1,3 @@ exports.HmrState = function() { -} +}; diff --git a/config/webpack.github-deploy.js b/config/webpack.github-deploy.js index 05978aee03..5ad45191b0 100644 --- a/config/webpack.github-deploy.js +++ b/config/webpack.github-deploy.js @@ -52,7 +52,7 @@ module.exports = webpackMerge(webpackConfig, { plugins: [ function() { - this.plugin("done", function(stats) { + this.plugin('done', function(stats) { console.log('Starting deployment to GitHub.'); const logger = function (msg) { @@ -73,7 +73,7 @@ module.exports = webpackMerge(webpackConfig, { console.log('GitHub deployment done. STATUS: SUCCESS.'); } }); - }) + }); } ] }); diff --git a/package.json b/package.json index 15f403c394..82e9ef2976 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "scripts": { "rimraf": "rimraf", "tslint": "tslint", + "eslint": "eslint", "typedoc": "typedoc", "webpack": "webpack", "webpack-dev-server": "webpack-dev-server", @@ -43,7 +44,7 @@ "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", - "lint": "npm run tslint \"src/**/*.ts\"", + "lint": "npm run tslint \"src/**/*.ts\" && npm run \"config/**/*.js\"", "pree2e": "npm run webdriver:update -- --standalone", "e2e": "npm run protractor", "e2e:live": "npm run e2e -- --elementExplorer", From 68dd7f810eb6a52d22a719e39cf19d08caff0bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 09:52:40 +0200 Subject: [PATCH 20/25] ~ updating deps in dev --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 82e9ef2976..9a8af32c43 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@types/core-js": "^0.9.28", "@types/hammerjs": "^2.0.28", "@types/jasmine": "^2.2.29", - "@types/node": "^4.0.29", + "@types/node": "^6.0.38", "@types/protractor": "^1.5.16", "@types/selenium-webdriver": "^2.44.26", "@types/source-map": "^0.1.26", @@ -90,7 +90,7 @@ "@types/webpack": "^1.12.29", "angular2-hmr": "~0.8.0", "angular2-template-loader": "^0.5.0", - "awesome-typescript-loader": "1.1.1", + "awesome-typescript-loader": "^2.2.1", "codelyzer": "~0.0.21", "copy-webpack-plugin": "^3.0.1", "css-loader": "^0.24.0", @@ -103,12 +103,12 @@ "istanbul-instrumenter-loader": "^0.2.0", "json-loader": "^0.5.4", "karma": "^0.13.22", - "karma-chrome-launcher": "^1.0.1", + "karma-chrome-launcher": "^2.0.0 ", "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.0", "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "1.7.0", + "karma-webpack": "1.8.0", "parse5": "^1.5.1", "protractor": "^3.2.2", "raw-loader": "0.5.1", @@ -119,8 +119,8 @@ "style-loader": "^0.13.1", "to-string-loader": "^1.1.4", "ts-helpers": "1.1.1", - "ts-node": "^0.9.1", - "tslint": "^3.15.1", + "ts-node": "^1.3.0", + "tslint": "^3.7.1", "tslint-loader": "^2.1.3", "typedoc": "^0.4.4", "typescript": "^2.0.0-beta", From 54ef7d879caee7045a8aa7b8e12a428719058025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 10:09:53 +0200 Subject: [PATCH 21/25] ~ fixing eslint and tslint --- package.json | 4 ++-- src/app/+detail/index.ts | 2 +- src/app/app.module.ts | 8 ++++---- src/app/environment.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 9a8af32c43..7c1cb5a689 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", - "lint": "npm run tslint \"src/**/*.ts\" && npm run \"config/**/*.js\"", + "lint": "npm run tslint \"src/**/*.ts\" && npm run eslint \"config/**/*.js\"", "pree2e": "npm run webdriver:update -- --standalone", "e2e": "npm run protractor", "e2e:live": "npm run e2e -- --elementExplorer", @@ -120,7 +120,7 @@ "to-string-loader": "^1.1.4", "ts-helpers": "1.1.1", "ts-node": "^1.3.0", - "tslint": "^3.7.1", + "tslint": "^3.15.1", "tslint-loader": "^2.1.3", "typedoc": "^0.4.4", "typescript": "^2.0.0-beta", diff --git a/src/app/+detail/index.ts b/src/app/+detail/index.ts index e7e720c3eb..3f2c745384 100644 --- a/src/app/+detail/index.ts +++ b/src/app/+detail/index.ts @@ -1,4 +1,4 @@ -import { BrowserModule } from '@angular/platform-browser' +import { BrowserModule } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1ede98c666..2bcd264b5b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -56,17 +56,17 @@ export class AppModule { delete store.state; } hmrOnDestroy(store) { - var cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement); + const cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement); // recreate elements - var state = this.appState._state; + const state = this.appState._state; store.state = state; - store.disposeOldHosts = createNewHosts(cmpLocation) + store.disposeOldHosts = createNewHosts(cmpLocation); // remove styles removeNgStyles(); } hmrAfterDestroy(store) { // display new elements - store.disposeOldHosts() + store.disposeOldHosts(); delete store.disposeOldHosts; } } diff --git a/src/app/environment.ts b/src/app/environment.ts index 80cdb1e291..8bba89c4ec 100644 --- a/src/app/environment.ts +++ b/src/app/environment.ts @@ -25,14 +25,14 @@ if ('production' === ENV) { } else { _decorateModuleRef = (modRef: any) => { - var appRef = modRef.injector.get(ApplicationRef); - var cmpRef = appRef.components[0]; + const appRef = modRef.injector.get(ApplicationRef); + const cmpRef = appRef.components[0]; let _ng = (window).ng; enableDebugTools(cmpRef); (window).ng.probe = _ng.probe; (window).ng.coreTokens = _ng.coreTokens; - return modRef + return modRef; }; // Development From b9fe37cc3a081b2507ed461f0ff16eba35c9d37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 10:27:17 +0200 Subject: [PATCH 22/25] ~ updating TSLint to @next --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7c1cb5a689..b410e3473a 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "to-string-loader": "^1.1.4", "ts-helpers": "1.1.1", "ts-node": "^1.3.0", - "tslint": "^3.15.1", + "tslint": "^3.15.0-dev.0", "tslint-loader": "^2.1.3", "typedoc": "^0.4.4", "typescript": "^2.0.0-beta", From 746d2e97ee7e33720a6d63264d43c1c2e10e869d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Sun, 28 Aug 2016 13:34:25 +0200 Subject: [PATCH 23/25] ~ removing conflicting @types/core-js definitions --- tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 02658dab1c..c4e2a88047 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,6 @@ "es6" ], "types": [ - "core-js", "hammerjs", "jasmine", "node", From ca6877998bb3aa56484d9c9874070631bfbd0fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Mon, 29 Aug 2016 09:17:50 +0200 Subject: [PATCH 24/25] ~ remove eslint and webpack-dashboard --- .editorconfig | 16 ---------------- config/webpack.dev.js | 10 ---------- package.json | 6 ++---- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 869ff6c553..0000000000 --- a/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -# @AngularClass -# http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -insert_final_newline = false -trim_trailing_whitespace = false diff --git a/config/webpack.dev.js b/config/webpack.dev.js index a6aa0a8504..6252e897a3 100644 --- a/config/webpack.dev.js +++ b/config/webpack.dev.js @@ -9,7 +9,6 @@ const commonConfig = require('./webpack.common.js'); // the settings that are co /** * Webpack Plugins */ -const DashboardPlugin = require('webpack-dashboard/plugin'); const DefinePlugin = require('webpack/lib/DefinePlugin'); const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin'); @@ -127,15 +126,6 @@ module.exports = webpackMerge(commonConfig, { */ new NamedModulesPlugin(), - /** - * Plugin: DashboardPlugin - * Description: View progress. - * `'It's like to work at NASA.'` - * - * See: https://github.com/FormidableLabs/webpack-dashboard - */ - new DashboardPlugin(), - ], /** diff --git a/package.json b/package.json index b410e3473a..63a989b2e4 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "scripts": { "rimraf": "rimraf", "tslint": "tslint", - "eslint": "eslint", "typedoc": "typedoc", "webpack": "webpack", "webpack-dev-server": "webpack-dev-server", @@ -39,12 +38,12 @@ "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --github-dev", "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --github-prod", "server": "npm run server:dev", - "server:dev": "webpack-dashboard -- webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", + "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", "server:dev:hmr": "npm run server:dev -- --inline --hot", "server:prod": "http-server dist --cors", "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", - "lint": "npm run tslint \"src/**/*.ts\" && npm run eslint \"config/**/*.js\"", + "lint": "npm run tslint \"src/**/*.ts\"", "pree2e": "npm run webdriver:update -- --standalone", "e2e": "npm run protractor", "e2e:live": "npm run e2e -- --elementExplorer", @@ -126,7 +125,6 @@ "typescript": "^2.0.0-beta", "url-loader": "^0.5.7", "webpack": "^2.1.0-beta.21", - "webpack-dashboard": "^0.1.8", "webpack-dev-middleware": "^1.6.1", "webpack-dev-server": "^2.1.0-beta.0", "webpack-md5-hash": "^0.0.5", From a67d786fdfc4a2b7d94c7b8acdaaf8fae507ad81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Mon, 29 Aug 2016 09:21:18 +0200 Subject: [PATCH 25/25] ~ reverting minor failure --- .editorconfig | 16 ++++++ .eslintrc | 137 -------------------------------------------------- 2 files changed, 16 insertions(+), 137 deletions(-) create mode 100644 .editorconfig delete mode 100644 .eslintrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..869ff6c553 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# @AngularClass +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 89f102c42a..0000000000 --- a/.eslintrc +++ /dev/null @@ -1,137 +0,0 @@ -{ - "ecmaFeatures": { - "modules": true - }, - "env": { - "browser": true, - "node": true, - "es6": true - }, - "rules": { - "no-alert": 2, - "no-array-constructor": 2, - "no-bitwise": 0, - "no-caller": 2, - "no-catch-shadow": 2, - "no-comma-dangle": 0, - "no-cond-assign": 2, - "no-console": 1, - "no-constant-condition": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-div-regex": 0, - "no-dupe-keys": 2, - "no-else-return": 0, - "no-empty": 2, - "no-empty-character-class": 2, - "no-labels": 2, - "no-eq-null": 0, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": 0, - "no-extra-semi": 2, - "no-fallthrough": 2, - "no-floating-decimal": 0, - "no-func-assign": 2, - "no-global-strict": 0, - "no-implied-eval": 2, - "no-invalid-regexp": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-lone-blocks": 2, - "no-lonely-if": 0, - "no-loop-func": 2, - "no-mixed-requires": [0, false], - "no-multi-str": 2, - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-nested-ternary": 0, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 0, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-path-concat": 0, - "no-plusplus": 0, - "no-process-exit": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-restricted-modules": 0, - "no-return-assign": 2, - "no-script-url": 2, - "no-self-compare": 0, - "no-sequences": 2, - "no-shadow": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "semi-spacing": 2, - "no-sparse-arrays": 2, - "no-sync": 0, - "no-ternary": 0, - "no-undef": 2, - "no-undef-init": 2, - "no-underscore-dangle": 2, - "no-unreachable": 2, - "no-unused-expressions": 0, - "no-unused-vars": [1, {"vars": "local", "args": "after-used"}], - "no-use-before-define": 0, - "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], - "no-with": 2, - "yoda": [2, "never"], - "block-scoped-var": 0, - "brace-style": [0, "1tbs"], - "camelcase": 2, - "complexity": [0, 11], - "consistent-return": 2, - "consistent-this": [0, "that"], - "curly": [2, "all"], - "default-case": 0, - "dot-notation": 2, - "eqeqeq": 2, - "func-names": 0, - "func-style": [0, "declaration"], - "guard-for-in": 0, - "max-depth": [0, 4], - "max-len": [0, 80, 4], - "max-nested-callbacks": [0, 2], - "max-params": [0, 3], - "max-statements": [0, 10], - "handle-callback-err": 0, - "new-cap": 0, - "new-parens": 2, - "one-var": 0, - "quote-props": 0, - "quotes": [2, "single", {"allowTemplateLiterals": true}], - "radix": 0, - "semi": 2, - "sort-vars": 0, - "space-after-keywords": [0, "always"], - "space-in-brackets": [0, "never"], - "space-infix-ops": 2, - "keyword-spacing": 2, - "space-unary-word-ops": 0, - "strict": [0, "global"], - "use-isnan": 2, - "valid-jsdoc": 0, - "valid-typeof": 2, - "wrap-iife": 0, - "wrap-regex": 0 - }, - "globals": { - "angular": true, - "browser": true, - "by": true, - "element": true, - "expect": true, - "protractor": true, - "xdescribe": true, - "xit": true - } -}