From 1c40ceb5785546a9f173f23a50e4cb686dfcdf4d Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Sat, 21 Jul 2018 15:46:15 -0700 Subject: [PATCH] Fix linting --- .eslintrc.js | 1 + mu-trees/addon/resolvers/fallback/index.js | 4 +-- .../addon/resolvers/glimmer-wrapper/index.js | 7 +++--- package.json | 1 + yarn.lock | 25 ++++++++++++++++++- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b956de0f..ec883f33 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,6 +28,7 @@ module.exports = { 'tests/dummy/config/**/*.js' ], excludedFiles: [ + 'mu-trees/**', 'addon/**', 'addon-test-support/**', 'app/**', diff --git a/mu-trees/addon/resolvers/fallback/index.js b/mu-trees/addon/resolvers/fallback/index.js index 28e01c04..d7938e94 100644 --- a/mu-trees/addon/resolvers/fallback/index.js +++ b/mu-trees/addon/resolvers/fallback/index.js @@ -1,11 +1,11 @@ import ClassicResolver from 'ember-resolver'; import Resolver from 'ember-resolver/resolvers/glimmer-wrapper'; -import Ember from 'ember'; +import { assign } from '@ember/polyfills'; export default Resolver.extend({ init(options) { this._super(options); - this._fallback = ClassicResolver.create(Ember.assign({ + this._fallback = ClassicResolver.create(assign({ namespace: { modulePrefix: this.config.app.name } }, options)); }, diff --git a/mu-trees/addon/resolvers/glimmer-wrapper/index.js b/mu-trees/addon/resolvers/glimmer-wrapper/index.js index a280e640..3aec22e6 100644 --- a/mu-trees/addon/resolvers/glimmer-wrapper/index.js +++ b/mu-trees/addon/resolvers/glimmer-wrapper/index.js @@ -1,8 +1,7 @@ -import Ember from 'ember'; import GlimmerResolver from '@glimmer/resolver/resolver'; import RequireJSRegistry from '../../module-registries/requirejs'; - -const { DefaultResolver, String: { dasherize } } = Ember; +import GlobalsResolver from '@ember/application/globals-resolver'; +import { dasherize } from '@ember/string'; function slasherize(dotted) { return dotted.replace(/\./g, '/'); @@ -69,7 +68,7 @@ function cleanupEmberSpecifier(specifier, source, _namespace) { * this code extends from the DefaultResolver, it should never * call `_super` or call into that code. */ -const Resolver = DefaultResolver.extend({ +const Resolver = GlobalsResolver.extend({ init() { this._super(...arguments); diff --git a/package.json b/package.json index 3a6565cd..09413fcc 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "ember-source-channel-url": "^1.0.1", "ember-try": "^0.2.23", "eslint": "^5.2.0", + "eslint-plugin-ember": "^5.2.0", "eslint-plugin-node": "^7.0.1", "loader.js": "^4.2.3", "qunit-dom": "^0.7.1" diff --git a/yarn.lock b/yarn.lock index 4ff5d018..a81da52f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2088,7 +2088,7 @@ ember-qunit@^3.3.2: ember-cli-test-loader "^2.2.0" qunit "^2.5.0" -ember-rfc176-data@^0.3.0, ember-rfc176-data@^0.3.1: +ember-rfc176-data@^0.3.0, ember-rfc176-data@^0.3.1, ember-rfc176-data@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.3.tgz#27fba08d540a7463a4366c48eaa19c5a44971a39" @@ -2243,6 +2243,13 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +eslint-plugin-ember@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-5.2.0.tgz#fa436e0497dfc01d1d38608229cd616e7c5b6067" + dependencies: + ember-rfc176-data "^0.3.3" + snake-case "^2.1.0" + eslint-plugin-es@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz#5acb2565db4434803d1d46a9b4cbc94b345bd028" @@ -4003,6 +4010,10 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + lowercase-keys@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" @@ -4302,6 +4313,12 @@ nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + dependencies: + lower-case "^1.1.1" + node-fetch@^1.3.3: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -5215,6 +5232,12 @@ slice-ansi@1.0.0: dependencies: is-fullwidth-code-point "^2.0.0" +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + dependencies: + no-case "^2.2.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"