Skip to content

Commit 75e7156

Browse files
committed
πŸ‘” eslint-metafizzy-plugin v1.2.1
remove opening & closing spaces around template strings remove .jshintrc
1 parent 171eed1 commit 75e7156

19 files changed

+29
-37
lines changed

β€Ž.jshintrcβ€Ž

Lines changed: 0 additions & 8 deletions
This file was deleted.

β€Žbin/build-dist.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let paths = [
2525
];
2626

2727
// concatenate files
28-
execSync( `cat ${paths.join(' ')} > ${distPath}` );
28+
execSync(`cat ${paths.join(' ')} > ${distPath}`);
2929

3030
// add banner
3131
let banner = indexContent.split(' */')[0] + ' */\n\n';

β€Žjs/core.jsβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ proto.updateScroller = function() {
172172
this.scroller = elementScroll === true ? this.element :
173173
utils.getQueryElement( elementScroll );
174174
if ( !this.scroller ) {
175-
throw new Error( `Unable to find elementScroll: ${elementScroll}` );
175+
throw new Error(`Unable to find elementScroll: ${elementScroll}`);
176176
}
177177
};
178178

@@ -181,7 +181,7 @@ proto.updateScroller = function() {
181181
proto.updateGetPath = function() {
182182
let optPath = this.options.path;
183183
if ( !optPath ) {
184-
console.error( `InfiniteScroll path option required. Set as: ${optPath}` );
184+
console.error(`InfiniteScroll path option required. Set as: ${optPath}`);
185185
return;
186186
}
187187
// function
@@ -247,14 +247,14 @@ proto.updateGetPathSelector = function( optPath ) {
247247
// parse href of link: '.next-page-link'
248248
let hrefElem = document.querySelector( optPath );
249249
if ( !hrefElem ) {
250-
console.error( `Bad InfiniteScroll path option. Next link not found: ${optPath}` );
250+
console.error(`Bad InfiniteScroll path option. Next link not found: ${optPath}`);
251251
return;
252252
}
253253

254254
let href = hrefElem.getAttribute('href');
255255
let pathParts = getPathParts( href );
256256
if ( !pathParts ) {
257-
console.error( `InfiniteScroll unable to parse next link href: ${href}` );
257+
console.error(`InfiniteScroll unable to parse next link href: ${href}`);
258258
return;
259259
}
260260

β€Žjs/page-load.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ InfiniteScroll.create.prefill = function() {
222222

223223
let append = this.options.append;
224224
if ( !append ) {
225-
console.error( `append option required for prefill. Set as :${append}` );
225+
console.error(`append option required for prefill. Set as :${append}`);
226226
return;
227227
}
228228
this.updateMeasurements();

β€Žpackage-lock.jsonβ€Ž

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

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"devDependencies": {
1515
"ava": "^3.13.0",
1616
"eslint": "^7.15.0",
17-
"eslint-plugin-metafizzy": "^1.1.2",
17+
"eslint-plugin-metafizzy": "^1.2.1",
1818
"imagesloaded": "^4.1.4",
1919
"jquery": "^3.5.1",
2020
"jquery-bridget": "^2.0.1",

β€Žtest/_get-server.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function listener( req, res ) {
3838
if ( !exist ) {
3939
// if the file is not found, return 404
4040
res.statusCode = 404;
41-
res.end( `File ${pathname} not found` );
41+
res.end(`File ${pathname} not found`);
4242
return;
4343
}
4444

@@ -51,7 +51,7 @@ function listener( req, res ) {
5151
fs.readFile( pathname, function( err, data ) {
5252
if ( err ) {
5353
res.statusCode = 500;
54-
res.end( `Error getting the file: ${err}.` );
54+
res.end(`Error getting the file: ${err}.`);
5555
} else {
5656
// if the file is found, set Content-type and send data
5757
let mimeType = mimeTypes[ ext ] || 'text/plain';

β€Žtest/check-last-page.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test.after( async function() {
1818

1919
async function withPage( t, run ) {
2020
const page = await browser.newPage();
21-
await page.goto( `http://localhost:${port}/test/html/page-load.html` );
21+
await page.goto(`http://localhost:${port}/test/html/page-load.html`);
2222
try {
2323
await run( t, page );
2424
} finally {
@@ -50,7 +50,7 @@ function getPageAssertions() {
5050

5151
let promise = new Promise( function( resolve ) {
5252
infScroll.once( 'last', function() {
53-
serialT.pass( `last event triggered on ${infScroll.pageIndex}` );
53+
serialT.pass(`last event triggered on ${infScroll.pageIndex}`);
5454
resolve( serialT.assertions );
5555
} );
5656
} );

β€Žtest/dist.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test.before( async function() {
1010
server.listen( port );
1111
browser = await puppeteer.launch();
1212
page = await browser.newPage();
13-
await page.goto( `http://localhost:${port}/test/html/dist.html` );
13+
await page.goto(`http://localhost:${port}/test/html/dist.html`);
1414
} );
1515

1616
test.after( async function() {

β€Žtest/history.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test.before( async function() {
1010
server.listen( port );
1111
browser = await puppeteer.launch();
1212
page = await browser.newPage();
13-
await page.goto( `http://localhost:${port}/test/html/history.html` );
13+
await page.goto(`http://localhost:${port}/test/html/history.html`);
1414
} );
1515

1616
test.after( async function() {

0 commit comments

Comments
Β (0)