Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make helpers unambiguious with parens aka subexpressions #507

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/fixtures/with-telemetry/input/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
6 changes: 6 additions & 0 deletions test/fixtures/with-telemetry/input/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
57 changes: 38 additions & 19 deletions test/fixtures/with-telemetry/input/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,58 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
},
plugins: [
'ember'
],
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true
},
rules: {
browser: true,
},
rules: {},
overrides: [
// node files
{
files: [
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js'
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/*/index.js',
'./server/**/*.js',
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
}
}
]
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off',
},
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
1 change: 1 addition & 0 deletions test/fixtures/with-telemetry/input/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# misc
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand Down
21 changes: 21 additions & 0 deletions test/fixtures/with-telemetry/input/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions test/fixtures/with-telemetry/input/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true,
};
5 changes: 5 additions & 0 deletions test/fixtures/with-telemetry/input/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',
};
18 changes: 10 additions & 8 deletions test/fixtures/with-telemetry/input/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
---
language: node_js
node_js:
- "6"
- "12"

sudo: false
dist: trusty
dist: xenial

addons:
chrome: stable

cache:
directories:
- $HOME/.npm
yarn: true

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

branches:
only:
- master

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

script:
- npm run lint:js
- npm test
- yarn test
13 changes: 7 additions & 6 deletions test/fixtures/with-telemetry/input/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# input
# my-project

This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.
Expand All @@ -8,15 +8,16 @@ A short introduction of this app could easily go here.
You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with npm)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/)

## Installation

* `git clone <repository-url>` this repository
* `cd input`
* `npm install`
* `cd my-project`
* `yarn install`

## Running / Development

Expand All @@ -35,8 +36,8 @@ Make use of the many generators for code, try `ember help generate` for more det

### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`
* `yarn lint`
* `yarn lint:fix`

### Building

Expand Down
16 changes: 7 additions & 9 deletions test/fixtures/with-telemetry/input/app/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import Application from '@ember/application';
import Resolver from './resolver';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import config from 'my-project/config/environment';

const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});
export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
}

loadInitializers(App, config.modulePrefix);

export default App;
3 changes: 0 additions & 3 deletions test/fixtures/with-telemetry/input/app/resolver.js

This file was deleted.

15 changes: 6 additions & 9 deletions test/fixtures/with-telemetry/input/app/router.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
import config from 'my-project/config/environment';

const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
export default class Router extends EmberRouter {
location = config.locationType;
rootURL = config.rootURL;
}

Router.map(function() {
});

export default Router;
Router.map(function () {});
Empty file.
20 changes: 20 additions & 0 deletions test/fixtures/with-telemetry/input/config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "ember-cli",
"version": "3.28.6",
"blueprints": [
{
"name": "app",
"outputRepo": "https://github.com/ember-cli/ember-new-output",
"codemodsSource": "ember-app-codemods-manifest@1",
"isBaseBlueprint": true,
"options": [
"--yarn"
]
}
]
}
]
}
8 changes: 4 additions & 4 deletions test/fixtures/with-telemetry/input/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

module.exports = function(environment) {
module.exports = function (environment) {
let ENV = {
modulePrefix: 'app',
environment,
Expand All @@ -13,14 +13,14 @@ module.exports = function(environment) {
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false
}
Date: false,
},
},

APP: {
// Here you can pass flags/options to your application instance
// when it is created
}
},
};

if (environment === 'development') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"jquery-integration": true
"application-template-wrapper": false,
"default-async-observers": true,
"jquery-integration": false,
"template-only-glimmer-components": true
}
24 changes: 16 additions & 8 deletions test/fixtures/with-telemetry/input/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@
const browsers = [
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
'last 1 Safari versions',
];

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}
// Ember's browser support policy is changing, and IE11 support will end in
// v4.0 onwards.
//
// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy
//
// If you need IE11 support on a version of Ember that still offers support
// for it, uncomment the code block below.
//
// const isCI = Boolean(process.env.CI);
// const isProduction = process.env.EMBER_ENV === 'production';
//
// if (isCI || isProduction) {
// browsers.push('ie 11');
// }

module.exports = {
browsers
browsers,
};
2 changes: 1 addition & 1 deletion test/fixtures/with-telemetry/input/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
'ember-bootstrap': {
'bootstrapVersion': 4,
Expand Down
Loading
Loading