Skip to content

Commit

Permalink
infra(unicorn): escape-case (#2469)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Oct 17, 2023
1 parent b8f31f6 commit a193693
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ module.exports = defineConfig({
// Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently.
'unicorn/better-regex': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/escape-case': 'off',
'unicorn/filename-case': 'off',
'unicorn/import-style': 'off',
'unicorn/no-array-callback-reference': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/git/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Faker } from '../..';
import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions';
import { deprecated } from '../../internal/deprecated';

const nbsp = '\u00a0';
const nbsp = '\u00A0';

/**
* Module to generate git related entries.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class SimpleHelpersModule {
slugify(string: string = ''): string {
return string
.normalize('NFKD') //for example è decomposes to as e + ̀
.replace(/[\u0300-\u036f]/g, '') // removes combining marks
.replace(/[\u0300-\u036F]/g, '') // removes combining marks
.replace(/ /g, '-') // replaces spaces with hyphens
.replace(/[^\w.-]+/g, ''); // removes all non-word characters except for dots and hyphens
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/internet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export class InternetModule {
// First remove simple accents etc
result = result
.normalize('NFKD') //for example è decomposes to as e + ̀
.replace(/[\u0300-\u036f]/g, ''); // removes combining marks
.replace(/[\u0300-\u036F]/g, ''); // removes combining marks

result = [...result]
.map((char) => {
Expand Down

0 comments on commit a193693

Please sign in to comment.