mirror of https://github.com/gorhill/uBlock.git
Run ESLint during Node.js package generation (#3798)
This commit is contained in:
parent
502e5b0ec8
commit
ad69c760fb
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"es2021": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 12,
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"indent": [ "warn", 4 ],
|
||||||
|
"getter-return": "off",
|
||||||
|
"no-control-regex": "off",
|
||||||
|
"no-empty": [ "error", { "allowEmptyCatch": true } ],
|
||||||
|
"no-useless-escape": "off"
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,6 +19,7 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* eslint-disable-next-line no-redeclare */
|
||||||
/* globals process */
|
/* globals process */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* globals WebAssembly */
|
/* globals WebAssembly vAPI */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ const BidiTrieContainer = class {
|
||||||
}
|
}
|
||||||
if ( al === aR ) { return 0; }
|
if ( al === aR ) { return 0; }
|
||||||
}
|
}
|
||||||
return 0;
|
return 0; // eslint-disable-line no-unreachable
|
||||||
}
|
}
|
||||||
|
|
||||||
matchesLeft(icell, ar, r) {
|
matchesLeft(icell, ar, r) {
|
||||||
|
@ -267,7 +267,7 @@ const BidiTrieContainer = class {
|
||||||
if ( icell === 0 ) { return 0; }
|
if ( icell === 0 ) { return 0; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0; // eslint-disable-line no-unreachable
|
||||||
}
|
}
|
||||||
|
|
||||||
matchesExtra(l, r, ix) {
|
matchesExtra(l, r, ix) {
|
||||||
|
@ -513,6 +513,7 @@ const BidiTrieContainer = class {
|
||||||
}
|
}
|
||||||
// TODO: we should never reach here because there will
|
// TODO: we should never reach here because there will
|
||||||
// always be a boundary cell.
|
// always be a boundary cell.
|
||||||
|
// eslint-disable-next-line no-debugger
|
||||||
debugger; // jshint ignore:line
|
debugger; // jshint ignore:line
|
||||||
// boundary cell + needle remainder
|
// boundary cell + needle remainder
|
||||||
inext = this.addCell(0, 0, 0);
|
inext = this.addCell(0, 0, 0);
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* globals self */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* globals WebAssembly */
|
/* globals WebAssembly vAPI */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* globals document */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* globals vAPI */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -54,6 +54,8 @@ cp platform/nodejs/*.js $DES/
|
||||||
cp platform/nodejs/*.json $DES/
|
cp platform/nodejs/*.json $DES/
|
||||||
cp LICENSE.txt $DES/
|
cp LICENSE.txt $DES/
|
||||||
|
|
||||||
|
eslint -c platform/nodejs/eslintrc.json $DES/js $DES/*.js
|
||||||
|
|
||||||
if [ "$1" = all ]; then
|
if [ "$1" = all ]; then
|
||||||
echo "*** uBlock0.nodejs: Creating plain package..."
|
echo "*** uBlock0.nodejs: Creating plain package..."
|
||||||
pushd $(dirname $DES/) > /dev/null
|
pushd $(dirname $DES/) > /dev/null
|
||||||
|
|
Loading…
Reference in New Issue