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

ESLint: Use "eslint-config-simplabs" #5

Merged
merged 1 commit into from
Feb 1, 2017
Merged
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
11 changes: 1 addition & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
extends: 'simplabs',
};
2 changes: 1 addition & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
command: 'npm test',
useVersionCompatibility: true,
Expand Down
3 changes: 2 additions & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*jshint node:true*/
'use strict';

/* eslint-env node */

module.exports = function(/* environment, appConfig */) {
return { };
};
4 changes: 2 additions & 2 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*jshint node:true*/
/* jshint node:true*/
/* global require, module */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
let app = new EmberAddon(defaults, {
// Add options here
});

Expand Down
2 changes: 1 addition & 1 deletion hbs-minifier-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports = class {
};

function isWhitespaceTextNode(node) {
return node && node.type === 'TextNode' && WHITESPACE.test(node.chars)
return node && node.type === 'TextNode' && WHITESPACE.test(node.chars);
}

function stripNoMinifyBlocks(nodes) {
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
module.exports = {
name: 'ember-hbs-minifier',

setupPreprocessorRegistry: function(type, registry) {
setupPreprocessorRegistry(type, registry) {
if (type === 'parent') {
var HbsMinifierPlugin = require('./hbs-minifier-plugin');
let HbsMinifierPlugin = require('./hbs-minifier-plugin');

registry.add('htmlbars-ast-plugin', {
name: 'hbs-minifier-plugin',
plugin: HbsMinifierPlugin,
baseDir: function() { return __dirname; }
baseDir() { return __dirname; }
});
}
},
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
"test": "ember test",
"lint": "eslint app addon blueprints config server test-support tests *.js"
},
"dependencies": {
"ember-cli-babel": "^5.1.7"
Expand All @@ -43,6 +44,7 @@
"ember-resolver": "^2.0.3",
"ember-source": "^2.11.0-beta.2",
"ember-welcome-page": "^2.0.2",
"eslint-config-simplabs": "0.2.2",
"loader.js": "^4.1.0"
},
"engines": {
Expand Down
16 changes: 8 additions & 8 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
'test_page': 'tests/index.html?hidepassed',
'disable_watching': true,
'launch_in_ci': [
'PhantomJS'
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
'launch_in_dev': [
'PhantomJS',
'Chrome'
]
};
4 changes: 1 addition & 3 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
env: {
embertest: true
}
extends: 'simplabs/configs/ember-qunit',
};
10 changes: 6 additions & 4 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* jshint node: true */
'use strict';

/* eslint-env node */

module.exports = function(environment) {
var ENV = {
let ENV = {
modulePrefix: 'dummy',
environment: environment,
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
Expand Down Expand Up @@ -43,7 +45,7 @@ module.exports = function(environment) {
}

if (environment === 'production') {

// here be dragons
}

return ENV;
Expand Down