Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no-useless-escape instances #1463

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default tseslint.config(
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-floating-promises': 'warn',
// TODO: Address these rules: (added to update to ESLint 9)
'no-useless-escape': 'off',
'@typescript-eslint/await-thenable': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-misused-promises': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/app.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function configureSwagger(app: INestApplication): void {
SwaggerModule.setup('api', app, document, {
customfavIcon: '/favicon.png',
customSiteTitle: 'Safe Client Gateway',
customCss: `.topbar-wrapper img { content:url(\'logo.svg\'); }`,
customCss: `.topbar-wrapper img { content:url('logo.svg'); }`,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/domain/account/entities/account.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface VerificationCode {
export class EmailAddress {
// https://www.ietf.org/rfc/rfc5322.txt
private static EMAIL_REGEX: RegExp =
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

constructor(readonly value: string) {
if (!EmailAddress.EMAIL_REGEX.test(value)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ describe('SafeAppInfo mapper (Unit)', () => {
it('should get a null SafeAppInfo for a transaction with no url into origin', async () => {
const chainId = faker.string.numeric();
const transaction = multisigTransactionBuilder()
.with(
'origin',
`{ \"${faker.word.sample()}\": \"${faker.word.sample()}\" }`,
)
.with('origin', `{ "${faker.word.sample()}": "${faker.word.sample()}" }`)
.build();
const safeApps = [safeAppBuilder().build(), safeAppBuilder().build()];
safeAppsRepositoryMock.getSafeApps.mockResolvedValue(safeApps);
Expand Down