mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 10:22:51 +01:00
Run ESLint during Node.js package generation (#3798)
This commit is contained in:
parent
502e5b0ec8
commit
ad69c760fb
18
platform/nodejs/eslintrc.json
Normal file
18
platform/nodejs/eslintrc.json
Normal file
@ -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
|
||||
*/
|
||||
|
||||
/* eslint-disable-next-line no-redeclare */
|
||||
/* globals process */
|
||||
|
||||
'use strict';
|
||||
|
@ -19,7 +19,7 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* globals WebAssembly */
|
||||
/* globals WebAssembly vAPI */
|
||||
|
||||
'use strict';
|
||||
|
||||
@ -223,7 +223,7 @@ const BidiTrieContainer = class {
|
||||
}
|
||||
if ( al === aR ) { return 0; }
|
||||
}
|
||||
return 0;
|
||||
return 0; // eslint-disable-line no-unreachable
|
||||
}
|
||||
|
||||
matchesLeft(icell, ar, r) {
|
||||
@ -267,7 +267,7 @@ const BidiTrieContainer = class {
|
||||
if ( icell === 0 ) { return 0; }
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return 0; // eslint-disable-line no-unreachable
|
||||
}
|
||||
|
||||
matchesExtra(l, r, ix) {
|
||||
@ -513,6 +513,7 @@ const BidiTrieContainer = class {
|
||||
}
|
||||
// TODO: we should never reach here because there will
|
||||
// always be a boundary cell.
|
||||
// eslint-disable-next-line no-debugger
|
||||
debugger; // jshint ignore:line
|
||||
// boundary cell + needle remainder
|
||||
inext = this.addCell(0, 0, 0);
|
||||
|
@ -19,6 +19,8 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* globals self */
|
||||
|
||||
'use strict';
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -19,7 +19,7 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* globals WebAssembly */
|
||||
/* globals WebAssembly vAPI */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* globals document */
|
||||
|
||||
'use strict';
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -19,6 +19,8 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* globals vAPI */
|
||||
|
||||
'use strict';
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -54,6 +54,8 @@ cp platform/nodejs/*.js $DES/
|
||||
cp platform/nodejs/*.json $DES/
|
||||
cp LICENSE.txt $DES/
|
||||
|
||||
eslint -c platform/nodejs/eslintrc.json $DES/js $DES/*.js
|
||||
|
||||
if [ "$1" = all ]; then
|
||||
echo "*** uBlock0.nodejs: Creating plain package..."
|
||||
pushd $(dirname $DES/) > /dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user