Skip to content

Commit

Permalink
Merge branch 'next' into infra/unicorn/prefer-object-from-entries
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Oct 8, 2023
2 parents c1e116a + eaf714d commit 8d7d542
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion scripts/apidoc/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function load(source: string): Promise<DocsApiDiffIndex> {
function allKeys(
...entries: ReadonlyArray<Record<string, unknown>>
): Set<string> {
return new Set(entries.map(Object.keys).flat());
return new Set(entries.flatMap(Object.keys));
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/locales/th/person/last_name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
14 changes: 7 additions & 7 deletions test/modules/finance_iban.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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(
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/apidoc/signature.debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 8d7d542

Please sign in to comment.