refactor: update eslint corrections

This commit is contained in:
2025-10-05 00:57:02 -07:00
parent 4c8d5d03d9
commit 9c3ee3d146
5 changed files with 15 additions and 13 deletions

View File

@@ -130,7 +130,7 @@ class CLib
encodeToHexBase64( str ) encodeToHexBase64( str )
{ {
const hex = [...str].map( char => const hex = [...str].map( ( char ) =>
{ {
const code = char.charCodeAt( 0 ).toString( 16 ); const code = char.charCodeAt( 0 ).toString( 16 );
return code.padStart( 2, '0' ); return code.padStart( 2, '0' );
@@ -155,7 +155,7 @@ class CLib
const hex = atob( base64Str ); const hex = atob( base64Str );
const chars = hex.match( /.{1,2}/g ); // every 2 hex chars = 1 byte const chars = hex.match( /.{1,2}/g ); // every 2 hex chars = 1 byte
return chars.map(byte => String.fromCharCode(parseInt(byte, 16))).join(''); return chars.map( ( byte ) => String.fromCharCode( parseInt( byte, 16 ) ) ).join( '' );
} }
} }
@@ -165,4 +165,5 @@ class CLib
@usage import CLib from './classes/CLib.js'; @usage import CLib from './classes/CLib.js';
*/ */
// eslint-disable-next-line no-restricted-syntax
export default CLib; export default CLib;

View File

@@ -117,4 +117,5 @@ class Log
@usage import Log from './classes/Log.js'; @usage import Log from './classes/Log.js';
*/ */
// eslint-disable-next-line no-restricted-syntax
export default Log; export default Log;

View File

@@ -42,5 +42,6 @@ class Semaphore
@usage import Log from './classes/Log.js'; @usage import Log from './classes/Log.js';
*/ */
// eslint-disable-next-line no-restricted-syntax
export default Semaphore; export default Semaphore;

View File

@@ -1,6 +1,5 @@
class Utils class Utils
{ {
/* /*
Returns the name of the function that this function was called from. Returns the name of the function that this function was called from.
used for Log.verbose used for Log.verbose
@@ -42,7 +41,7 @@ class Utils
} }
else return Boolean( str ); else return Boolean( str );
} }
} }
// eslint-disable-next-line no-restricted-syntax
export default Utils; export default Utils;

View File

@@ -223,7 +223,7 @@ export default
'@stylistic/no-whitespace-before-property': ['error'], '@stylistic/no-whitespace-before-property': ['error'],
'@stylistic/object-curly-spacing': ['error', 'always'], '@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/quote-props': ['error', 'as-needed'], '@stylistic/quote-props': ['error', 'as-needed'],
'@stylistic/quotes': ['error', 'single', { allowTemplateLiterals: true }], '@stylistic/quotes': ['error', 'single', { allowTemplateLiterals: 'always' }],
'@stylistic/semi': ['error', 'always'], '@stylistic/semi': ['error', 'always'],
'@stylistic/space-infix-ops': ['error'], '@stylistic/space-infix-ops': ['error'],
'@stylistic/template-curly-spacing': ['error', 'always'], '@stylistic/template-curly-spacing': ['error', 'always'],