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

Feature/backstop 6.3.x #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
40 changes: 20 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended'],
env: {
browser: true
browser: true,
node: true,
},
rules: {
"no-console": 0
'no-console': 0,
},
overrides: [
// node files
Expand All @@ -28,26 +24,30 @@ module.exports = {
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
'tests/dummy/config/**/*.js',
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
'tests/dummy/app/**',
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
ecmaVersion: 2015,
},
env: {
browser: false,
node: true
node: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
rules: Object.assign(
{},
require('eslint-plugin-node').configs.recommended.rules,
{
// add your custom rules and overrides for node files here
}
),
},
],
};
2 changes: 1 addition & 1 deletion addon-test-support/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { backstop } from './backstop';

export { backstop };
export default backstop;
3 changes: 2 additions & 1 deletion commands/backstop-stop.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
{ name: 'config', type: String, aliases: ['c'], default: './backstop.js' }
],
description: 'Stop the backstop-remote service.',
// eslint-disable-next-line no-unused-vars
run(commandOptions) {
return new Promise((resolve, reject) => {
http.get(stopUrl, (resp) => {
Expand Down Expand Up @@ -41,4 +42,4 @@ module.exports = {
});
});
}
};
};
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = {
_configMiddleware(app) {
const config = getConfig(this.project);
// if using native backstop remote server
// eslint-disable-next-line node/no-extraneous-require
const proxy = require("http-proxy").createProxyServer({});

proxy.on("error", function (err, req, res) {
Expand All @@ -44,6 +45,7 @@ module.exports = {
res.end(err + " Please check that backstop-remote service is running.");
});

// eslint-disable-next-line no-unused-vars
app.use(BACKSTOP_PROXY_PATH, function (req, res, next) {
proxy.web(req, res, { target: BACKSTOP_PROXY_TARGET });
});
Expand All @@ -62,6 +64,7 @@ function getConfig(project) {
try {
const configPath = `./${configDir}/${BACKSTOP_ADDON_CONFIG_FILE_NAME}`;
Object.assign(config, project.require(configPath));
// eslint-disable-next-line no-empty
} catch (err) {}

return config;
Expand Down
Loading