diff --git a/.eslintrc.js b/.eslintrc.js index 306ff146f7e..bb135397802 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -60,7 +60,6 @@ module.exports = defineConfig({ 'unicorn/no-array-push-push': 'off', 'unicorn/no-array-reduce': 'off', 'unicorn/no-await-expression-member': 'off', - 'unicorn/no-console-spaces': 'off', 'unicorn/no-for-loop': 'off', 'unicorn/no-hex-escape': 'off', 'unicorn/no-instanceof-array': 'off', @@ -71,7 +70,6 @@ module.exports = defineConfig({ 'unicorn/no-useless-switch-case': 'off', 'unicorn/no-zero-fractions': 'off', 'unicorn/numeric-separators-style': 'off', - 'unicorn/prefer-array-flat-map': 'off', 'unicorn/prefer-array-some': 'off', 'unicorn/prefer-code-point': 'off', 'unicorn/prefer-export-from': 'off', diff --git a/scripts/apidoc/diff.ts b/scripts/apidoc/diff.ts index 654f44b0260..18b8e60fc4d 100644 --- a/scripts/apidoc/diff.ts +++ b/scripts/apidoc/diff.ts @@ -46,7 +46,7 @@ async function load(source: string): Promise { function allKeys( ...entries: ReadonlyArray> ): Set { - return new Set(entries.map(Object.keys).flat()); + return new Set(entries.flatMap(Object.keys)); } /** diff --git a/src/locales/th/person/last_name.ts b/src/locales/th/person/last_name.ts index ecae422a4d2..7dcead830ec 100644 --- a/src/locales/th/person/last_name.ts +++ b/src/locales/th/person/last_name.ts @@ -21,9 +21,9 @@ const common_isan_suffix = [ 'พิมาย', 'นอก', ]; -const isan_complete = common_isan_prefix - .map((prefix) => common_isan_suffix.map((suffix) => `${prefix}${suffix}`)) - .flat(); +const isan_complete = common_isan_prefix.flatMap((prefix) => + common_isan_suffix.map((suffix) => `${prefix}${suffix}`) +); // https://www.thairath.co.th/lifestyle/culture/2030525 const chinese = [ diff --git a/test/modules/finance_iban.spec.ts b/test/modules/finance_iban.spec.ts index 5c32fed384c..c2dc12a7819 100644 --- a/test/modules/finance_iban.spec.ts +++ b/test/modules/finance_iban.spec.ts @@ -56,7 +56,7 @@ describe('finance_iban', () => { `${iban.substring( 2, 4 - )} must contains only digit in GE IBAN ${ibanFormatted}` + )} must contains only digits in GE IBAN ${ibanFormatted}` ).toMatch(/^\d{2}$/); expect( iban.substring(4, 6), @@ -70,7 +70,7 @@ describe('finance_iban', () => { `${iban.substring( 6, 24 - )} must contains only characters in GE IBAN ${ibanFormatted}` + )} must contains only digits in GE IBAN ${ibanFormatted}` ).toMatch(/^\d{16}$/); expect( @@ -116,7 +116,7 @@ describe('finance_iban', () => { `${iban.substring( 2, 4 - )} must contains only digit in PK IBAN ${ibanFormated}` + )} must contains only digits in PK IBAN ${ibanFormated}` ).toMatch(/^\d{2}$/); expect( iban.substring(4, 8), @@ -182,7 +182,7 @@ describe('finance_iban', () => { `Control key:${iban.substring( 2, 4 - )} must contains only digit in PK IBAN ${ibanFormated}` + )} must contains only digits in PK IBAN ${ibanFormated}` ).toMatch(/^\d{2}$/); expect( iban.substring(4, 9), @@ -252,7 +252,7 @@ describe('finance_iban', () => { `${iban.substring( 2, 4 - )} must contains only digit in AZ IBAN ${ibanFormated}` + )} must contains only digits in AZ IBAN ${ibanFormated}` ).toMatch(/^\d{2}$/); expect( iban.substring(4, 8), @@ -266,7 +266,7 @@ describe('finance_iban', () => { `${iban.substring( 8, 28 - )} must contains 20 characters in AZ IBAN ${ibanFormated}` + )} must contains 20 digits in AZ IBAN ${ibanFormated}` ).toMatch(/^\d{20}$/); expect( @@ -312,7 +312,7 @@ describe('finance_iban', () => { `${iban.substring( 2, 22 - )} must contains only digit in AZ IBAN ${ibanFormated}` + )} must contains only digits in AZ IBAN ${ibanFormated}` ).toMatch(/^\d{20}$/); expect( diff --git a/test/scripts/apidoc/signature.debug.ts b/test/scripts/apidoc/signature.debug.ts index 347b8235b0f..a9ec8fd05e7 100644 --- a/test/scripts/apidoc/signature.debug.ts +++ b/test/scripts/apidoc/signature.debug.ts @@ -13,9 +13,9 @@ const methods = loadExampleMethods(); initMarkdownRenderer() .then(() => { Object.entries(methods).forEach(([name, method]) => { - console.log('Analyzing: ', name); + console.log('Analyzing:', name); const result = analyzeSignature(method, '', method.name); - console.log('Result: ', result); + console.log('Result:', result); }); }) .catch(console.error);