Skip to content

Commit 58eba8d

Browse files
authored
fix: STRF-13427 bump eslint-config-airbnb-base (#1295)
* fix: STRF-13427 bump eslint-config-airbnb-base * bump eslint-config-prettier
1 parent dcabef8 commit 58eba8d

File tree

8 files changed

+40
-19
lines changed

8 files changed

+40
-19
lines changed

lib/BuildConfigManager.spec.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ describe('BuildConfigManager integration tests', () => {
7777
});
7878
await buildConfig.initConfig();
7979
expect(buildConfig.development).toBeInstanceOf(Function);
80-
await new Promise((done) => buildConfig.initWorker().development({ reload: done }));
80+
await new Promise((done) => {
81+
buildConfig.initWorker().development({ reload: done });
82+
});
8183
buildConfig.stopWorker();
8284
});
8385
it('should reload the browser when "reload" method is called from stencil.conf.js (legacy-config)', async () => {
@@ -86,7 +88,9 @@ describe('BuildConfigManager integration tests', () => {
8688
});
8789
await buildConfig.initConfig();
8890
expect(buildConfig.development).toBeInstanceOf(Function);
89-
await new Promise((done) => buildConfig.initWorker().development({ reload: done }));
91+
await new Promise((done) => {
92+
buildConfig.initWorker().development({ reload: done });
93+
});
9094
buildConfig.stopWorker();
9195
});
9296
});

lib/stencil-pull.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import async from 'async';
22
import stencilPushUtils from './stencil-push.utils.js';
33
import stencilPullUtils from './stencil-pull.utils.js';
44

5+
// eslint-disable-next-line default-param-last
56
function stencilPull(options = {}, callback) {
67
async.waterfall(
78
[

lib/stencil-push.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import async from 'async';
22
import utils from './stencil-push.utils.js';
33

4+
// eslint-disable-next-line default-param-last
45
function stencilPush(options = {}, callback) {
56
async.waterfall(
67
[

package-lock.json

Lines changed: 20 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
"@semantic-release/release-notes-generator": "^14.0.3",
109109
"conventional-changelog-cli": "^2.2.2",
110110
"eslint": "^7.10.0",
111-
"eslint-config-airbnb-base": "^14.2.0",
112-
"eslint-config-prettier": "^6.11.0",
111+
"eslint-config-airbnb-base": "^15.0.0",
112+
"eslint-config-prettier": "^6.15.0",
113113
"eslint-plugin-import": "^2.26.0",
114114
"eslint-plugin-jest": "^24.0.2",
115115
"eslint-plugin-node": "^11.1.0",

server/lib/utils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ const uuidRegExp = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-([0-9a-f]{12
77
*/
88
function stripDomainFromCookies(cookies) {
99
return cookies.map((val) =>
10-
val
11-
.replace(/(?:;\s)?domain=(?:.+?)(;|$)/gi, '$1')
12-
.replace(new RegExp('; SameSite=none', 'gi'), ''),
10+
val.replace(/(?:;\s)?domain=(?:.+?)(;|$)/gi, '$1').replace(/; SameSite=none/gi, ''),
1311
);
1412
}
1513
/**

server/plugins/renderer/responses/pencil-response.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const makeDecorator = (request, context) => (content) => {
7373
if (request.query.debug === 'bar') {
7474
const contextStr = escapeHtml(JSON.stringify(context, null, 2));
7575
const debugBar = `<pre style="background-color:#EEE; word-wrap:break-word;"> ${contextStr} </pre>`;
76-
const bodyRegex = new RegExp('</body>');
76+
const bodyRegex = /<\/body>/;
7777
updatedContent = content.replace(bodyRegex, `${debugBar}\n</body>`);
7878
}
7979
return updatedContent;

server/plugins/renderer/responses/pencil-response.spec.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ import templateAssembler from '../../../../lib/template-assembler.js';
66

77
describe('PencilResponse', () => {
88
const assembler = {
9-
getTemplates: (p) => new Promise((resolve) => resolve({ path: p })),
10-
getTranslations: () => new Promise((resolve) => resolve([])),
9+
getTemplates: (p) =>
10+
new Promise((resolve) => {
11+
resolve({ path: p });
12+
}),
13+
getTranslations: () =>
14+
new Promise((resolve) => {
15+
resolve([]);
16+
}),
1117
};
1218
let data;
1319
let request;

0 commit comments

Comments
 (0)