🌐 AI搜索 & 代理 主页
Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6315322
Build: Configure eslint
JuanMaRuiz Jan 20, 2019
54be4f2
Build: Configure eslint
JuanMaRuiz Jan 20, 2019
ed18cae
Build: Configure eslint
JuanMaRuiz Jan 20, 2019
4efc809
Build: Fixing eslint errors
JuanMaRuiz Jan 20, 2019
97f2bfe
Build: Fixing eslint line length errors
JuanMaRuiz Jan 21, 2019
49d0a94
Build: Fixing eslint non nesting ternary
JuanMaRuiz Jan 22, 2019
624e7ce
Build: Removed old jshint grunt task
JuanMaRuiz Jan 22, 2019
12ee0c5
Build: Configure eslint
JuanMaRuiz Mar 7, 2019
13a8efa
Build: Configure eslint
JuanMaRuiz Mar 7, 2019
57c01b7
Build: Configure eslint
JuanMaRuiz Mar 7, 2019
a80d39b
Build: Configure eslint
JuanMaRuiz Mar 7, 2019
c888650
Merge branch 'fix-438-use-eslint' of https://github.com/JuanMaRuiz/si…
JuanMaRuiz Mar 7, 2019
5c763ff
Build: Configure eslint - PR requested changes
JuanMaRuiz Mar 10, 2019
4cc4ae1
Build: Configure eslint
JuanMaRuiz Mar 10, 2019
7b96d79
Build: Configure eslint for test folder
JuanMaRuiz May 7, 2019
e1e793e
Merge branch 'master' into fix-438-use-eslint
JuanMaRuiz May 7, 2019
57efcda
Build: Configure eslint for test folder
JuanMaRuiz May 7, 2019
03f498c
Build: Configure eslint for test folder
JuanMaRuiz May 7, 2019
8fae5dd
Build: Configure eslint - PR request
JuanMaRuiz May 24, 2019
24d0a94
Build: Configure eslint - PR improvements
JuanMaRuiz May 26, 2019
684520f
Build: Configure eslint - PR improvements
JuanMaRuiz May 26, 2019
f258209
Build: Configure eslint - PR improvements
JuanMaRuiz May 26, 2019
acc8a1c
Build: Configure eslint - PR improvements
JuanMaRuiz May 26, 2019
1d2d470
Build: Configure eslint - PR improvements
JuanMaRuiz May 26, 2019
fb6b2f2
Build: Removed strict configuration in eslint
JuanMaRuiz May 26, 2019
ea5dca1
Build: Improve eslint configuration, fix configuration errors
JuanMaRuiz May 27, 2019
9f12b3b
Build: Improve eslint configuration, fix configuration errors
JuanMaRuiz May 27, 2019
09d6a26
Build: Some PR improvements and re-indents
JuanMaRuiz May 27, 2019
7c3f27e
Build: Improve eslint configuration, changed location and setTimeout
JuanMaRuiz May 28, 2019
bfe54cd
Merge remote-tracking branch 'origin/fix-438-use-eslint' into fix-438…
JuanMaRuiz May 28, 2019
e8a2553
Build: Reverted dot notation to bracket notation in sizzle
JuanMaRuiz May 28, 2019
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
Prev Previous commit
Next Next commit
Build: Improve eslint configuration, changed location and setTimeout
- Re-indented some comments and code after added eslint
- Changed location and setTimeout for window.location and
window.setTimeout.

fix: #438
  • Loading branch information
JuanMaRuiz committed May 28, 2019
commit 7c3f27e12e82aa3e301dc37ebd3f9136cbbc2d66
2 changes: 1 addition & 1 deletion dist/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// That is okay for the built version
"no-multiple-empty-lines": "off",

// Sizzle is not compatible with jQuery code style
// Too many violations.
"no-nested-ternary": "off"
}
}
76 changes: 38 additions & 38 deletions dist/sizzle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Released under the MIT license
* https://js.foundation/
*
* Date: 2019-05-27
* Date: 2019-05-28
*/
( function( window ) {
var i,
Expand Down Expand Up @@ -215,21 +215,21 @@ try {
} catch ( e ) {
push = { apply: arr.length ?

// Leverage slice if possible
function( target, els ) {
pushNative.apply( target, slice.call( els ) );
} :
// Leverage slice if possible
function( target, els ) {
pushNative.apply( target, slice.call( els ) );
} :

// Support: IE<9
// Otherwise append directly
function( target, els ) {
var j = target.length,
i = 0;
// Support: IE<9
// Otherwise append directly
function( target, els ) {
var j = target.length,
i = 0;

// Can't trust NodeList.length
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
target.length = j - 1;
}
// Can't trust NodeList.length
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
target.length = j - 1;
}
};
}

Expand Down Expand Up @@ -531,9 +531,9 @@ function createDisabledPseudo( disabled ) {

return elem.disabled === disabled;

// Try to winnow out elements that can't be disabled before trusting the disabled property.
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
// even exist on them, let alone have a boolean value.
// Try to winnow out elements that can't be disabled before trusting the disabled property.
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
// even exist on them, let alone have a boolean value.
} else if ( "label" in elem ) {
return elem.disabled === disabled;
}
Expand Down Expand Up @@ -620,7 +620,7 @@ if ( doc === document || doc.nodeType !== 9 ) {
if ( subWindow.addEventListener ) {
subWindow.addEventListener( "unload", unloadHandler, false );

// Support: IE 9 - 10 only
// Support: IE 9 - 10 only
} else if ( subWindow.attachEvent ) {
subWindow.attachEvent( "onunload", unloadHandler );
}
Expand Down Expand Up @@ -719,7 +719,7 @@ if ( doc === document || doc.nodeType !== 9 ) {
if ( typeof context.getElementsByTagName !== "undefined" ) {
return context.getElementsByTagName( tag );

// DocumentFragment nodes don't have gEBTN
// DocumentFragment nodes don't have gEBTN
} else if ( support.qsa ) {
return context.querySelectorAll( tag );
}
Expand Down Expand Up @@ -977,7 +977,7 @@ if ( doc === document || doc.nodeType !== 9 ) {
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
0;

// If the nodes are siblings, we can do a quick check
// If the nodes are siblings, we can do a quick check
} else if ( aup === bup ) {
return siblingCheck( a, b );
}
Expand Down Expand Up @@ -1704,7 +1704,7 @@ Expr = Sizzle.selectors = {
}
};

Expr.pseudos.nth = Expr.pseudos.eq;
Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
Expand Down Expand Up @@ -1994,7 +1994,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
}
}

// Add elements to results, through postFinder if defined
// Add elements to results, through postFinder if defined
} else {
matcherOut = condense(
matcherOut === results ?
Expand Down Expand Up @@ -2305,29 +2305,29 @@ select = Sizzle.select = function( selector, context, results, seed ) {
return results;
};

// One-time assignments
// One-time assignments

// Sort stability
// Sort stability
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;

// Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
// Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;

// Initialize against the default document
// Initialize against the default document
setDocument();

// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert( function( el ) {

// Should return 1, but returns 4 (following)
return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
} );

// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert( function( el ) {
el.innerHTML = "<a href='#'></a>";
return el.firstChild.getAttribute( "href" ) === "#";
Expand All @@ -2339,8 +2339,8 @@ select = Sizzle.select = function( selector, context, results, seed ) {
} );
}

// Support: IE<9
// Use defaultValue in place of getAttribute("value")
// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert( function( el ) {
el.innerHTML = "<input/>";
el.firstChild.setAttribute( "value", "" );
Expand All @@ -2353,8 +2353,8 @@ select = Sizzle.select = function( selector, context, results, seed ) {
} );
}

// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert( function( el ) {
return el.getAttribute( "disabled" ) == null;
} ) ) {
Expand All @@ -2369,7 +2369,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
} );
}

// EXPOSE
// EXPOSE
var _sizzle = window.Sizzle;

Sizzle.noConflict = function() {
Expand All @@ -2385,7 +2385,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
return Sizzle;
} );

// Sizzle requires that there be a global window in Common-JS like environments
// Sizzle requires that there be a global window in Common-JS like environments
} else if ( typeof module !== "undefined" && module.exports ) {
module.exports = Sizzle;
} else {
Expand Down
2 changes: 1 addition & 1 deletion dist/sizzle.min.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"requirejs-text": "2.0.15"
},
"scripts": {
"lint": "grunt eslint",
"build": "npm install && grunt",
"start": "grunt start",
"test": "grunt test"
Expand Down
2 changes: 0 additions & 2 deletions speed/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"globals": {
"console": true,
"require": true,
"setTimeout": true,
"location": true,
"window": true
}
}
4 changes: 2 additions & 2 deletions speed/speed.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function( Benchmark, document, selectors ) {
urlParams = ( function() {
var parts, value,
params = {},
search = location.search.substring( 1 ).split( "&" ),
search = window.location.search.substring( 1 ).split( "&" ),
i = 0,
len = search.length;

Expand Down Expand Up @@ -387,7 +387,7 @@ function( Benchmark, document, selectors ) {
index = callbacks.push( function() {
var self = this,
args = arguments;
setTimeout( function() {
window.setTimeout( function() {
test.apply( self, args );
}, 0 );
} ) - 1;
Expand Down
30 changes: 15 additions & 15 deletions src/sizzle.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,21 @@ try {
} catch ( e ) {
push = { apply: arr.length ?

// Leverage slice if possible
function( target, els ) {
pushNative.apply( target, slice.call( els ) );
} :

// Support: IE<9
// Otherwise append directly
function( target, els ) {
var j = target.length,
i = 0;
// Leverage slice if possible
function( target, els ) {
pushNative.apply( target, slice.call( els ) );
} :

// Can't trust NodeList.length
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
target.length = j - 1;
}
// Support: IE<9
// Otherwise append directly
function( target, els ) {
var j = target.length,
i = 0;

// Can't trust NodeList.length
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
target.length = j - 1;
}
};
}

Expand Down Expand Up @@ -1704,7 +1704,7 @@ Expr = Sizzle.selectors = {
}
};

Expr.pseudos.nth = Expr.pseudos.eq;
Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
Expand Down
2 changes: 2 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

// Not really too many - waiting for autofix features for these rules
"lines-around-comment": "off",

// Turned off for compatibility with Google Closure Compiler's advanced mode
"dot-notation": "off"
}
}