Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Upgrade to ember cli 3.4 via ember-cli-update #251

Merged
merged 15 commits into from
Oct 23, 2018
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
44 changes: 42 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,50 @@ module.exports = {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
}
},
overrides: [
// node files
{
files: [
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/**/*.js',
'node-tests/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
};
20 changes: 13 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log
*.swp

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
42 changes: 27 additions & 15 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.eslintignore
/.eslintrc.js
/.gitignore
/.watchmanconfig
/.travis.yml
/bower.json
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
.gitkeep

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

module.exports = {
extends: 'recommended'
};
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ addons:
cache:
yarn: true

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

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

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

script:
- yarn lint:js
- yarn test

before_deploy:
- yarn global add auto-dist-tag
- auto-dist-tag --write
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2017
Copyright (c) 2016-2018

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

ember-cli-eslint
==============================================================================

Expand Down Expand Up @@ -161,6 +160,7 @@ Contributing
### Installation

* `git clone` this repository
* `cd ember-cli-eslint`
* `npm install`
* `bower install`

Expand All @@ -174,13 +174,21 @@ Contributing
* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
* `ember try:each`

### Building
### Linting

* `ember build`
* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

### Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

License
------------------------------------------------------------------------------
Expand Down
84 changes: 84 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
'use strict';

const getChannelURL = require('ember-source-channel-url');

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary')
]).then((urls) => {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-2.16',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.16.0'
}
}
},
{
name: 'ember-lts-2.18',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.18.0'
}
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
}
]
};
});
};
3 changes: 1 addition & 2 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
return { };
return {};
};
2 changes: 1 addition & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-env node */
'use strict';
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function (defaults) {
Expand Down
6 changes: 5 additions & 1 deletion node-tests/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

module.exports = {
root: true,
extends: 'eslint:recommended',
extends: ['eslint:recommended'],
parserOptions: {
ecmaVersion: 2017
},
env: {
es6: true,
node: true,
mocha: true
},
Expand Down
6 changes: 3 additions & 3 deletions node-tests/blueprints/ember-cli-eslint-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Acceptance: install ember-cli-eslint', function() {
it('removes the JSHint addon', function() {
var args = ['ember-cli-eslint', 'foo'];

td.when(prompt(td.matchers.anything())).thenResolve({ deleteFiles: 'all' });
td.when(prompt(td.matchers.anything())).thenResolve({ answer: 'overwrite', deleteFiles: 'all' });

return emberNew()
.then(function() {
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('Acceptance: install ember-cli-eslint', function() {
path.join('.', 'tests', 'dummy', 'app', 'dist', '.jshintrc')
];

td.when(prompt(td.matchers.anything())).thenResolve({ deleteFiles: 'all' });
td.when(prompt(td.matchers.anything())).thenResolve({ answer: 'overwrite', deleteFiles: 'all' });

return emberNew()
.then(function() {
Expand All @@ -109,7 +109,7 @@ describe('Acceptance: install ember-cli-eslint', function() {
it('does not remove any files if it shouldn\'t', function() {
var args = ['ember-cli-eslint', 'foo'];

td.when(prompt(td.matchers.anything())).thenResolve({ deleteFiles: 'none' });
td.when(prompt(td.matchers.anything())).thenResolve({ answer: 'overwrite', deleteFiles: 'none' });

return emberNew()
.then(function() {
Expand Down
Loading