Skip to content

Commit

Permalink
Merge pull request #236 from rwjblue/fix-linting
Browse files Browse the repository at this point in the history
Fixup linting issues.
  • Loading branch information
rwjblue authored May 17, 2018
2 parents 7bf6d33 + 9383e54 commit 7568677
Show file tree
Hide file tree
Showing 11 changed files with 459 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/blueprints/*/files/**/*.js
/dist
/vendor
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module.exports = {
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
'tests/dummy/app/**',
'mu-trees/**',
],
parserOptions: {
sourceType: 'script',
Expand Down
61 changes: 37 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,50 @@ addons:
cache:
yarn: true

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-1.13
- EMBER_TRY_SCENARIO=ember-lts-2.4
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=module-unification

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --no-lockfile --non-interactive
- yarn install

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

jobs:
fail_fast: true

include:
# runs tests in chrome with current locked deps and linting

- env: NAME=test # used only to make Travis UI show description
script:
- yarn lint:js
- yarn test

# If that passes:
# - run tests without pinned dependencies to catch issues with new versions
# - run tests in each supported ember version
- stage: additional tests
env: NAME=floating dependencies
install: yarn install --no-lockfile --non-interactive
script:
- yarn test

- env: EMBER_TRY_SCENARIO=ember-1.13
- env: EMBER_TRY_SCENARIO=ember-lts-2.4
- env: EMBER_TRY_SCENARIO=ember-lts-2.8
- env: EMBER_TRY_SCENARIO=ember-lts-2.12
- env: EMBER_TRY_SCENARIO=ember-lts-2.16
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=module-unification
4 changes: 2 additions & 2 deletions addon/resolvers/classic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ const Resolver = DefaultResolver.extend({
description = this.lookupDescription(parsedName);
}

/* eslint-disable no-console */
if (console && console.info) {
// eslint-disable-next-line no-console
console.info(symbol, parsedName.fullName, padding, description);
console.info(symbol, parsedName.fullName, padding, description);
}
},

Expand Down
2 changes: 1 addition & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module.exports = function() {
}
},
{
name: 'ember-beta',
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
Expand Down
3 changes: 0 additions & 3 deletions mu-trees/addon/module-registries/requirejs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global require, requirejs */
import {
deserializeSpecifier
} from '@glimmer/di';
Expand Down Expand Up @@ -83,8 +82,6 @@ export default class RequireJSRegistry {
get(specifierString) {
let specifier = deserializeSpecifier(specifierString);

let useDefaultType = this._checkDefaultType(specifier);

/* return an export */
let moduleExport = this._detectModule(specifier, path => {
return (path in this._require.entries) && this._require(path).default;
Expand Down
2 changes: 1 addition & 1 deletion mu-trees/addon/resolvers/glimmer-wrapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const Resolver = DefaultResolver.extend({
if (source || namespace) {
let rootName = namespace || this._configRootName;

let [type, name] = specifier.split(':');
let [type] = specifier.split(':');

/*
* Ember components require their lookupString to be massaged. Make this
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"scripts": {
"build": "ember build",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember test",
"test:all": "ember try:each"
Expand Down Expand Up @@ -48,6 +49,7 @@
"ember-source": "~3.1.0",
"ember-source-channel-url": "^1.0.1",
"ember-try": "^0.2.23",
"eslint": "^4.19.1",
"eslint-plugin-node": "^6.0.1",
"loader.js": "^4.2.3"
},
Expand Down
5 changes: 0 additions & 5 deletions tests/.eslintrc.js

This file was deleted.

7 changes: 2 additions & 5 deletions tests/unit/resolvers/classic/basic-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* globals requirejs, define */

/* eslint-disable no-console */

import Ember from 'ember';
import require from 'require';
import { module, test } from 'qunit';
Expand Down Expand Up @@ -499,9 +501,6 @@ module("Logging", {
beforeEach: function() {
originalConsoleInfo = console ? console.info : null;
logCalls = [];
if (!console) {
console = {info: null};
}
console.info = function(arg) {
logCalls.push(arg);
};
Expand All @@ -511,8 +510,6 @@ module("Logging", {
afterEach: function() {
if (originalConsoleInfo) {
console.info = originalConsoleInfo;
} else {
console = undefined;
}
}
});
Expand Down
Loading

0 comments on commit 7568677

Please sign in to comment.