Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var debug = logger( 'to-reference:sync' );
*
* @example
* var ref = toReference( '@press1992' );
* // returns '...'
* // throws <Error>
*/
function toReference( id, options ) {
var outFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ var rule;
* @returns {Object} validators
*/
function main( context ) {
var source = context.getSourceCode();
var filename = context.getFilename();
var source = context.getSourceCode();

return {
'Program': validate
Expand Down Expand Up @@ -106,7 +106,7 @@ function main( context ) {
if ( year !== expected ) {
report( 'Expected year to be '+expected+' and not '+year, comment, expected );
}
} catch ( err ) {
} catch {
// Do nothing if unable to determine the year the file was created (e.g., if the file is not tracked yet by `git`).
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@ function copy1( arr ) {

len = arr.length;
if ( len > MAX_FAST_ELEMENTS_HEURISTIC ) {
out = new Array( MAX_FAST_ELEMENTS_HEURISTIC );
out = [];
out.length = MAX_FAST_ELEMENTS_HEURISTIC;
for ( i = 0; i < MAX_FAST_ELEMENTS_HEURISTIC; i++ ) {
out[ i ] = arr[ i ];
}
for ( i = MAX_FAST_ELEMENTS_HEURISTIC; i < len; i++ ) {
out.push( arr[ i ] );
}
} else {
out = new Array( len );
out = [];
out.length = len;
for ( i = 0; i < len; i++ ) {
out[ i ] = arr[ i ];
}
Expand All @@ -89,7 +91,8 @@ function copy2( arr ) {
var i;

len = arr.length;
out = new Array( len );
out = [];
out.length = len;
for ( i = 0; i < len; i++ ) {
out[ i ] = arr[ i ];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
"-",
"--",
":",
"-.",
"none"
]
"-",
"--",
":",
"-.",
"none"
]
Loading