Skip to content
This repository has been archived by the owner on Feb 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #104 from Turbo87/eslint
Browse files Browse the repository at this point in the history
Replace JSHint with ESLint
  • Loading branch information
pangratz committed Mar 22, 2018
2 parents 9a931d1 + 195a1e3 commit a3578ed
Show file tree
Hide file tree
Showing 14 changed files with 678 additions and 182 deletions.
50 changes: 50 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,50 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
'ember/new-module-imports': 'off',
},
overrides: [
// node files
{
files: [
'index.js',
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'lib/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'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
})
}
]
};
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .npmignore
Expand Up @@ -8,7 +8,7 @@
.editorconfig
.ember-cli
.gitignore
.jshintrc
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -35,6 +35,7 @@ install:
- bower install

script:
- yarn lint:js
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
Expand Down
1 change: 0 additions & 1 deletion config/ember-try.js
@@ -1,4 +1,3 @@
/*jshint node:true*/
module.exports = {
command: 'ember test',
scenarios: [
Expand Down
1 change: 0 additions & 1 deletion config/environment.js
@@ -1,4 +1,3 @@
/*jshint node:true*/
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
2 changes: 0 additions & 2 deletions ember-cli-build.js
@@ -1,5 +1,3 @@
/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
Expand Down
1 change: 0 additions & 1 deletion index.js
@@ -1,4 +1,3 @@
/* jshint node: true */
'use strict';

const path = require('path');
Expand Down
1 change: 0 additions & 1 deletion lib/ast-plugins.js
@@ -1,4 +1,3 @@
/* jshint node: true */
'use strict';

const fs = require('fs');
Expand Down
1 change: 0 additions & 1 deletion lib/require-from-worker.js
@@ -1,4 +1,3 @@
/* jshint node: true */
'use strict';

const debugGenerator = require('heimdalljs-logger');
Expand Down
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -8,6 +8,7 @@
},
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"start": "ember server",
"test": "mocha && ember try:each",
"test:unit": "mocha"
Expand All @@ -27,9 +28,9 @@
"ember-cli-babel": "^6.7.1",
"ember-cli-coffeescript": "github:rwjblue/ember-cli-coffeescript#update-version-checker-api",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars": "^1.3.2",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^2.0.1",
"ember-cli-preprocess-registry": "^3.1.1",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
Expand All @@ -40,6 +41,8 @@
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.6.3",
"ember-resolver": "^3.0.0",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-node": "^5.2.1",
"htmlbars-comment-redactor": "^0.0.4",
"loader.js": "^4.0.10",
"mocha": "^3.4.2",
Expand Down
1 change: 0 additions & 1 deletion testem.js
@@ -1,4 +1,3 @@
/*jshint node:true*/
module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
Expand Up @@ -43,7 +43,7 @@ module.exports = function(environment) {
}

if (environment === 'production') {

// here you can enable a production-specific feature
}

return ENV;
Expand Down

0 comments on commit a3578ed

Please sign in to comment.