From e57d734ab46b45e30f29f83690e4d83dc191bf1e Mon Sep 17 00:00:00 2001 From: BrianSipple Date: Wed, 18 May 2016 04:02:57 -0700 Subject: [PATCH 1/8] make note about file format change --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f050e8a..bb038e9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 1.4.0 / 14-05-2016 - Root configuration no longer relies on `eslint-config-ember`. (Discussion around appropriate base configuration is [still ongoing](https://github.com/ember-cli/ember-cli-eslint/pull/61)) - Default blueprint now generates `.eslintrc.js` and `tests/.eslintrc.js` (`.eslintrc` has been [deprecated](http://eslint.org/docs/user-guide/configuring#configuration-file-formats). + - **Potential Changes:** If you have a `.eslintrc` or `tests/.eslintrc` file, please reformat it to be a `.eslintrc.js` file (using `module.exports`) so that `ember-cli-eslint` can detect potential duplicates. - Base root configuration now extends from `eslint:recommended`. - Base `/test` configuration now defines `embertest: true` as an `env` setting. From a6d443961d974dc35b52a82bf181fb5c64af5f73 Mon Sep 17 00:00:00 2001 From: Brian Sipple Date: Tue, 24 May 2016 12:43:03 -0700 Subject: [PATCH 2/8] Document Disabling JSHint (#64) Document disabling jshint throughout different versions of Ember --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 5728c0d4..0958aa77 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,34 @@ After installing, simply add the following option to your `eslint` configuration "parser": "babel-eslint", ``` +## Disabling JSHint +Congratulations! You've made the leap into the next generation of JavaScript linting. At the moment, however, `ember-cli` defaults to generating applications and addons with a `jshint` configuration, and so you may initially notice the two awkwardly running side by side. Here are a few tips for handling this: + +#### ember-cli >= 2.5.0 +As of `ember-cli v.2.5.0`, [`jshint` is provided through its own `ember-cli-jshint` addon](https://github.com/ember-cli/ember-cli/pull/5757). Running `npm uninstall --save-dev ember-cli-jshint`, in addition to removing any `.jshintrc` files from your project should guarantee that its behavior is disabled. + +#### ember-cli < 2.5.0 +Controlling linting is a bit trickier on versions of `ember-cli` prior to `2.5.0`. Within your `ember-cli-build.js` file, `ember-cli-qunit` or `ember-cli-mocha` can be configured to have their default linting process disabled during: + +```javascript +'ember-cli-qunit': { + useLintTree: false +} +``` +or +```javascript +'ember-cli-mocha': { + useLintTree: false +} +``` +Alongside this setting, the `hinting` property can then be used to enable/disable globally: + +```javascript +hinting: !isTesting, +``` +Furthermore, a `.eslintignore` file can be used to exclude files from linting while the linter is running. Its syntax is identical to `.gitignore` files. + + ## Installation * `ember install ember-cli-eslint` From 70965a7b568227ef74b1e3e4ce44bd47364d6c26 Mon Sep 17 00:00:00 2001 From: Brian Sipple Date: Tue, 24 May 2016 12:46:24 -0700 Subject: [PATCH 3/8] Update README.md --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0958aa77..96fb41ca 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,11 @@ ESLinting for Ember CLI apps, [ESLint](http://eslint.org/) provides a scriptable mechanism for checking applications against a strict set of rules. -## Basic setup - -* `ember install ember-cli-eslint` -* This will create a `.eslintrc` file in your project directory setup with the correct parser. +## Installation +``` +ember install ember-cli-eslint +``` +This will create a `.eslintrc` file in your project directory setup with the correct parser. ## ESLint Babel @@ -56,10 +57,6 @@ hinting: !isTesting, Furthermore, a `.eslintignore` file can be used to exclude files from linting while the linter is running. Its syntax is identical to `.gitignore` files. -## Installation - -* `ember install ember-cli-eslint` - ## Configuration ESLint will be run by `ember-cli-qunit` or `ember-cli-mocha` automatically; **no additional configuration is required**. If ESLint is *not* being run automatically, try updating your `ember-cli` or `ember-cli-qunit`/`embe-cli-mocha` version. @@ -84,7 +81,9 @@ var app = new EmberApp({ for a more detailed example, you can find the implementation in `ember-cli-qunit` [here](https://github.com/ember-cli/ember-cli-qunit/blob/ba906cacc8674e7c0d6d8ed74223a284dcdebf94/index.js#L192-L203). -## Running tests + +## Contributing +### Running tests ``` npm install -g phantomjs; From 86dfa17ec12211ec1c1d1b8c9517db412492ad58 Mon Sep 17 00:00:00 2001 From: Brian Sipple Date: Fri, 27 May 2016 18:34:25 -0700 Subject: [PATCH 4/8] More clarity for .ember-cli-build.js config examples --- README.md | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 96fb41ca..e58b1d3f 100644 --- a/README.md +++ b/README.md @@ -39,20 +39,39 @@ As of `ember-cli v.2.5.0`, [`jshint` is provided through its own `ember-cli-jshi Controlling linting is a bit trickier on versions of `ember-cli` prior to `2.5.0`. Within your `ember-cli-build.js` file, `ember-cli-qunit` or `ember-cli-mocha` can be configured to have their default linting process disabled during: ```javascript -'ember-cli-qunit': { - useLintTree: false -} + +module.exports = function(defaults) { + const app = new EmberApp(defaults, { + 'ember-cli-qunit': { + useLintTree: false + } + ... + }); +}; + ``` or ```javascript -'ember-cli-mocha': { - useLintTree: false -} +module.exports = function(defaults) { + const app = new EmberApp(defaults, { + 'ember-cli-mocha': { + useLintTree: false + } + ... + }); +}; ``` Alongside this setting, the `hinting` property can then be used to enable/disable globally: ```javascript -hinting: !isTesting, +const isTesting = process.env.EMBER_ENV === 'test'; + +module.exports = function(defaults) { + const app = new EmberApp(defaults, { + hinting: !isTesting, + ... + }); +}; ``` Furthermore, a `.eslintignore` file can be used to exclude files from linting while the linter is running. Its syntax is identical to `.gitignore` files. From 463491cfca2c8dcc53c79efd9529aa16bd2ce71d Mon Sep 17 00:00:00 2001 From: Brian Sipple Date: Fri, 27 May 2016 18:35:44 -0700 Subject: [PATCH 5/8] More clarity for .ember-cli-build.js config examples --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index e58b1d3f..ec91835a 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,6 @@ module.exports = function(defaults) { 'ember-cli-qunit': { useLintTree: false } - ... }); }; @@ -57,7 +56,6 @@ module.exports = function(defaults) { 'ember-cli-mocha': { useLintTree: false } - ... }); }; ``` @@ -69,7 +67,6 @@ const isTesting = process.env.EMBER_ENV === 'test'; module.exports = function(defaults) { const app = new EmberApp(defaults, { hinting: !isTesting, - ... }); }; ``` From 912c6638d22aec8f201e4635d9fe0bd697aec0a8 Mon Sep 17 00:00:00 2001 From: Brian Sipple Date: Mon, 30 May 2016 18:31:37 -0700 Subject: [PATCH 6/8] Remove eslint-config-ember from package (#60) Remove eslint-config-ember from package and use `eslint:recommended` in tests --- config/eslint-tests.js | 4 ++-- config/eslint.js | 2 +- package.json | 1 - tests/dummy/app/controllers/.eslintrc | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config/eslint-tests.js b/config/eslint-tests.js index 002564e2..981cf6e7 100644 --- a/config/eslint-tests.js +++ b/config/eslint-tests.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - "extends": "ember", + "extends": "eslint:recommended", "parser": "babel-eslint", "rules": { "arrow-spacing": 0, @@ -13,6 +13,6 @@ module.exports = { "arrow-spacing": 0, "array-callback-return": 0, "no-empty-function": 0, - "prefer-rest-params": 0 + "prefer-rest-params": 0 } }; diff --git a/config/eslint.js b/config/eslint.js index 7a02a894..ab364edf 100644 --- a/config/eslint.js +++ b/config/eslint.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - "extends": "ember", + "extends": "eslint:recommended", "parser": "babel-eslint", "env": { "es6": true diff --git a/package.json b/package.json index 7583bc6b..0f564872 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "ember-load-initializers": "^0.5.0", "ember-resolver": "^2.0.3", "ember-try": "^0.1.2", - "eslint-config-ember": "^0.3.0", "express": "^4.12.3", "loader.js": "^4.0.0", "phantomjs": "^2.1.3" diff --git a/tests/dummy/app/controllers/.eslintrc b/tests/dummy/app/controllers/.eslintrc index 626aeb4d..d117642b 100644 --- a/tests/dummy/app/controllers/.eslintrc +++ b/tests/dummy/app/controllers/.eslintrc @@ -1,5 +1,4 @@ { - "extends": "ember", "rules": { "no-undef": 0 } From b5b0ba89c5d898b66115c86b022b32419f651593 Mon Sep 17 00:00:00 2001 From: Brian Sipple Date: Mon, 30 May 2016 18:33:20 -0700 Subject: [PATCH 7/8] Remove phantomJS from devDependencies #65 --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 0f564872..200cfdf2 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,7 @@ "ember-resolver": "^2.0.3", "ember-try": "^0.1.2", "express": "^4.12.3", - "loader.js": "^4.0.0", - "phantomjs": "^2.1.3" + "loader.js": "^4.0.0" }, "dependencies": { "broccoli-lint-eslint": "^2.0.0", From e697038cf7f727704a70f6fb5035b5a150901cbd Mon Sep 17 00:00:00 2001 From: BrianSipple Date: Mon, 30 May 2016 18:41:21 -0700 Subject: [PATCH 8/8] Released v1.4.1 --- CHANGELOG.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb038e9b..9cd4c8df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.4.1 / 30-05-2016 +- Remove `eslint-config-ember` and `phantomjs` from `devDependencies`. + # 1.4.0 / 14-05-2016 - Root configuration no longer relies on `eslint-config-ember`. (Discussion around appropriate base configuration is [still ongoing](https://github.com/ember-cli/ember-cli-eslint/pull/61)) - Default blueprint now generates `.eslintrc.js` and `tests/.eslintrc.js` (`.eslintrc` has been [deprecated](http://eslint.org/docs/user-guide/configuring#configuration-file-formats). diff --git a/package.json b/package.json index 200cfdf2..1a74fc75 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli-eslint", - "version": "1.4.0", + "version": "1.4.1", "description": "Ember-cli eslint support, for checking your application matches your coding standards.", "directories": { "doc": "doc",