mirror of
https://github.com/valitydev/dashboard.git
synced 2024-11-06 02:25:23 +00:00
TD-694: Add spell checker (#143)
This commit is contained in:
parent
e67db789aa
commit
1a1099d8f2
19
.github/workflows/pr.yaml
vendored
19
.github/workflows/pr.yaml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
prettier:
|
||||
format:
|
||||
name: Format check
|
||||
runs-on: ubuntu-latest
|
||||
needs: [init]
|
||||
@ -28,8 +28,8 @@ jobs:
|
||||
key: ${{ github.sha }}
|
||||
- name: Check
|
||||
run: npm run format
|
||||
eslint:
|
||||
name: ESLint check
|
||||
lint:
|
||||
name: Lint check
|
||||
runs-on: ubuntu-latest
|
||||
needs: [init]
|
||||
steps:
|
||||
@ -54,6 +54,19 @@ jobs:
|
||||
key: ${{ github.sha }}
|
||||
- name: Check
|
||||
run: npm run i18n:check
|
||||
spell:
|
||||
name: Spell check
|
||||
runs-on: ubuntu-latest
|
||||
needs: [init]
|
||||
steps:
|
||||
- name: Cache all
|
||||
uses: actions/cache@v3
|
||||
id: cache
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
- name: Check
|
||||
run: npm run spell
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
40
.vscode/settings.json
vendored
40
.vscode/settings.json
vendored
@ -1,44 +1,4 @@
|
||||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"cSpell.words": [
|
||||
"CAPI",
|
||||
"FATCA",
|
||||
"Metrika",
|
||||
"OGRN",
|
||||
"OKVED",
|
||||
"SNILS",
|
||||
"Yandex",
|
||||
"actionbar",
|
||||
"anapi",
|
||||
"anthroponym",
|
||||
"codegen",
|
||||
"dadata",
|
||||
"datepicker",
|
||||
"daterange",
|
||||
"downlevel",
|
||||
"dropdown",
|
||||
"esnext",
|
||||
"innfl",
|
||||
"isempty",
|
||||
"keycloak",
|
||||
"mastercard",
|
||||
"multiselect",
|
||||
"ngneat",
|
||||
"pdfmake",
|
||||
"rbkmoney",
|
||||
"roboto",
|
||||
"snils",
|
||||
"submodule",
|
||||
"transloco",
|
||||
"webvisor",
|
||||
"ЕГРЮЛ",
|
||||
"СНИЛС",
|
||||
"бенефициарного",
|
||||
"бенефициарные",
|
||||
"бенефициарный",
|
||||
"инвойс",
|
||||
"инвойса"
|
||||
],
|
||||
"cSpell.language": "en,ru",
|
||||
"prettier.prettierPath": "node_modules/prettier"
|
||||
}
|
||||
|
74
cspell.json
Normal file
74
cspell.json
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
||||
"version": "0.2",
|
||||
"import": "node_modules/@vality/cspell-config/cspell.config.js",
|
||||
"ignorePaths": ["**/country-codes.ts"],
|
||||
"words": [
|
||||
"transloco",
|
||||
"xrequest",
|
||||
"klass",
|
||||
"aggr",
|
||||
"kontur",
|
||||
"unflat",
|
||||
"datepicker",
|
||||
"autoselect",
|
||||
"semipolar",
|
||||
"autofilled",
|
||||
"describedby",
|
||||
"capitilize",
|
||||
"easeinout",
|
||||
"crosshairs",
|
||||
"apexcharts",
|
||||
"yaxis",
|
||||
"xaxis",
|
||||
"initializable",
|
||||
"daterange",
|
||||
"ngxd",
|
||||
"TOTP",
|
||||
"actionbar",
|
||||
"topo",
|
||||
"toponim",
|
||||
"dadata",
|
||||
"unlim",
|
||||
"apikeys",
|
||||
"anapi",
|
||||
"libphonenumber",
|
||||
|
||||
"SNILS",
|
||||
"ОГРН",
|
||||
"OGRNIP",
|
||||
"ОГРНИП",
|
||||
"ABARTN",
|
||||
"OGRN",
|
||||
"OKVED",
|
||||
|
||||
"мсек",
|
||||
|
||||
"dankort",
|
||||
"forbrugsforeningen",
|
||||
"QIWI",
|
||||
"uzcard",
|
||||
"euroset",
|
||||
"yandex",
|
||||
"samsungpay",
|
||||
"googlepay",
|
||||
"applepay",
|
||||
"rupay",
|
||||
"visaelectron",
|
||||
"unionpay",
|
||||
"nspkmir",
|
||||
"dinersclub",
|
||||
"yandexpay",
|
||||
|
||||
"chargedback",
|
||||
|
||||
"авторитативности",
|
||||
"предавторизация",
|
||||
"предавторизации",
|
||||
|
||||
"мерчант",
|
||||
"мерчанта",
|
||||
|
||||
"licences"
|
||||
]
|
||||
}
|
1229
package-lock.json
generated
1229
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"start": "ng serve --proxy-config proxy.conf.js --port 8000",
|
||||
"stage": "cross-env NODE_ENV=stage ng serve --proxy-config proxy.conf.js --port 8001 --configuration=stage",
|
||||
"fix": "npm run lint:fix && npm run format:fix",
|
||||
"fix": "npm run lint:fix && npm run format:fix && npm run spell:fix",
|
||||
"build": "ng build && transloco-optimize dist/assets/i18n",
|
||||
"test": "ng test",
|
||||
"i18n:extract": "transloco-keys-manager extract",
|
||||
@ -20,7 +20,9 @@
|
||||
"tools-cmd": "ts-node --project tools/tsconfig.json",
|
||||
"icons-list-gen": "npm run tools-cmd -- tools/gen-icons-list.ts",
|
||||
"icons-ids-gen": "npm run tools-cmd -- tools/gen-icons-ids.ts",
|
||||
"ci:test": "npm run test -- --configuration=ci"
|
||||
"ci:test": "npm run test -- --configuration=ci",
|
||||
"spell": "cspell --no-progress **",
|
||||
"spell:fix": "cspell --no-progress --show-suggestions --show-context **"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^16.2.0",
|
||||
@ -86,9 +88,11 @@
|
||||
"@types/lodash-es": "4.17.6",
|
||||
"@types/moment": "2.13.0",
|
||||
"@types/prettier": "^3.0.0",
|
||||
"@vality/cspell-config": "^7.0.1-pr-33-52841c7.0",
|
||||
"@vality/eslint-config": "^8.0.1-pr-33-52841c7.0",
|
||||
"@vality/prettier-config": "3.0.1-pr-33-52841c7.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"cspell": "^7.0.0",
|
||||
"dotenv": "^16.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"glob": "^7.1.6",
|
||||
|
@ -9,7 +9,7 @@ import { MOCK_MEMBER_ROLE } from './mock-member-role';
|
||||
|
||||
export const MOCK_INVITEE_CONTACT: InviteeContact = {
|
||||
type: InviteeContact.TypeEnum.EMail,
|
||||
email: 'user@rbkmoney.com',
|
||||
email: 'user@vality.dev',
|
||||
};
|
||||
|
||||
export const MOCK_INVITEE: Invitee = {
|
||||
@ -23,6 +23,6 @@ export const MOCK_INVITATION: Invitation = {
|
||||
expiresAt: '2020-11-21T18:43:00.000000Z',
|
||||
invitee: MOCK_INVITEE,
|
||||
acceptToken: 'token',
|
||||
metadata: { metameta: 'postpost' },
|
||||
metadata: { metaMeta: 'postPost' },
|
||||
status: InvitationStatusName.Pending,
|
||||
};
|
||||
|
@ -4,5 +4,5 @@ export const MOCK_ORG: Organization = {
|
||||
id: '9d560cdb-ce17-4ba5-b5c6-cc9c0eb1ad19',
|
||||
createdAt: '2020-10-30T19:30:57Z',
|
||||
name: 'Organization name #3',
|
||||
owner: 'user@rbkmoney.com',
|
||||
owner: 'user@vality.dev',
|
||||
};
|
||||
|
@ -75,7 +75,7 @@ describe('MembersComponent', () => {
|
||||
});
|
||||
|
||||
describe('refresh', () => {
|
||||
it('should load memebers$', () => {
|
||||
it('should load members$', () => {
|
||||
component.members$.subscribe();
|
||||
component.refresh();
|
||||
verify(mockOrganizationsService.listOrgMembers(MOCK_ORG.id)).twice();
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { OrginizationSectionComponent } from './organization-section.component';
|
||||
import { OrganizationSectionComponent } from './organization-section.component';
|
||||
|
||||
const ORGANIZATION_SECTION_ROUTES: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: OrginizationSectionComponent,
|
||||
component: OrganizationSectionComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'organizations',
|
||||
@ -35,4 +35,4 @@ const ORGANIZATION_SECTION_ROUTES: Routes = [
|
||||
imports: [RouterModule.forChild(ORGANIZATION_SECTION_ROUTES)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class OrginizationSectionRoutingModule {}
|
||||
export class OrganizationSectionRoutingModule {}
|
||||
|
@ -3,4 +3,4 @@ import { Component } from '@angular/core';
|
||||
@Component({
|
||||
template: `<router-outlet></router-outlet>`,
|
||||
})
|
||||
export class OrginizationSectionComponent {}
|
||||
export class OrganizationSectionComponent {}
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { TRANSLOCO_SCOPE } from '@ngneat/transloco';
|
||||
|
||||
import { OrginizationSectionRoutingModule } from './organization-section-routing.module';
|
||||
import { OrginizationSectionComponent } from './organization-section.component';
|
||||
import { OrganizationSectionRoutingModule } from './organization-section-routing.module';
|
||||
import { OrganizationSectionComponent } from './organization-section.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [OrginizationSectionRoutingModule],
|
||||
declarations: [OrginizationSectionComponent],
|
||||
exports: [OrginizationSectionComponent],
|
||||
imports: [OrganizationSectionRoutingModule],
|
||||
declarations: [OrganizationSectionComponent],
|
||||
exports: [OrganizationSectionComponent],
|
||||
providers: [{ provide: TRANSLOCO_SCOPE, useValue: 'organization-section' }],
|
||||
})
|
||||
export class OrginizationSectionModule {}
|
||||
export class OrganizationSectionModule {}
|
||||
|
@ -6,7 +6,7 @@ import { TokenProvider, PaymentSystem } from '@dsh/app/api/payments';
|
||||
interface BankCardIconConfig {
|
||||
iconName: string;
|
||||
width: string;
|
||||
heigth: string;
|
||||
height: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
@ -20,11 +20,11 @@ export class BankCardComponent {
|
||||
getPaymentSystemIconConfig(paymentSystem: PaymentSystem): BankCardIconConfig {
|
||||
switch (paymentSystem) {
|
||||
case PaymentSystem.Visa:
|
||||
return { iconName: 'visa', width: '32px', heigth: '24px' };
|
||||
return { iconName: 'visa', width: '32px', height: '24px' };
|
||||
case PaymentSystem.MasterCard:
|
||||
return { iconName: 'mastercard', width: '24px', heigth: '24px' };
|
||||
return { iconName: 'mastercard', width: '24px', height: '24px' };
|
||||
case PaymentSystem.Mir:
|
||||
return { iconName: 'mir', width: '32px', heigth: '24px' };
|
||||
return { iconName: 'mir', width: '32px', height: '24px' };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@ -33,13 +33,13 @@ export class BankCardComponent {
|
||||
getTokenProviderIconConfig(tokenProvider: TokenProvider): BankCardIconConfig {
|
||||
switch (tokenProvider) {
|
||||
case TokenProvider.SamsungPay:
|
||||
return { iconName: 'samsung_pay', width: '100px', heigth: '27px' };
|
||||
return { iconName: 'samsung_pay', width: '100px', height: '27px' };
|
||||
case TokenProvider.GooglePay:
|
||||
return { iconName: 'google_pay', width: '40px', heigth: '26px' };
|
||||
return { iconName: 'google_pay', width: '40px', height: '26px' };
|
||||
case TokenProvider.ApplePay:
|
||||
return { iconName: 'apple_pay', width: '24px', heigth: '24px' };
|
||||
return { iconName: 'apple_pay', width: '24px', height: '24px' };
|
||||
case TokenProvider.YandexPay:
|
||||
return { iconName: 'yandex_pay', width: '44px', heigth: '24px' };
|
||||
return { iconName: 'yandex_pay', width: '44px', height: '24px' };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ const ROUTES: Routes = [
|
||||
{
|
||||
path: 'organization-section',
|
||||
loadChildren: () =>
|
||||
import('./organization-section').then((m) => m.OrginizationSectionModule),
|
||||
import('./organization-section').then((m) => m.OrganizationSectionModule),
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
|
@ -10,7 +10,7 @@ import { StatusToColorPipe } from './status-to-color.pipe';
|
||||
import { WithdrawalInfoComponent } from './withdrawal-info.component';
|
||||
|
||||
/**
|
||||
* @deprecated have to delete after redisign
|
||||
* @deprecated have to delete after redesign
|
||||
*/
|
||||
@NgModule({
|
||||
imports: [CommonModule, FlexModule, DetailsItemModule, TranslocoModule, AmountCurrencyModule],
|
||||
|
@ -4,7 +4,7 @@ import { InvoiceStatus } from '@vality/swag-anapi-v2';
|
||||
import { combineLatest, Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { InvoiceStatusLabelPipe } from './pipes/invoce-status-label.pipe';
|
||||
import { InvoiceStatusLabelPipe } from './pipes/invoice-status-label.pipe';
|
||||
import { OPTION_LABELS } from './types/option-labels';
|
||||
|
||||
import StatusEnum = InvoiceStatus.StatusEnum;
|
||||
|
@ -6,7 +6,7 @@ import { TranslocoModule } from '@ngneat/transloco';
|
||||
import { RadioGroupFieldModule } from '@dsh/components/form-controls/radio-group-field';
|
||||
|
||||
import { InvoiceStatusFieldComponent } from './invoice-status-field.component';
|
||||
import { InvoiceStatusLabelPipe } from './pipes/invoce-status-label.pipe';
|
||||
import { InvoiceStatusLabelPipe } from './pipes/invoice-status-label.pipe';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, TranslocoModule, ReactiveFormsModule, RadioGroupFieldModule],
|
||||
|
@ -8,7 +8,7 @@ export function getAbstractControl<Control extends AbstractControl, GroupType =
|
||||
path: string,
|
||||
) {
|
||||
if (isEmpty(path)) {
|
||||
throw new Error(`Path can't be an emtpy string`);
|
||||
throw new Error(`Path can't be an empty string`);
|
||||
}
|
||||
if (isNil(form.get(path))) {
|
||||
throw new Error(`Can't get a control by path "${path}"`);
|
||||
|
@ -314,12 +314,12 @@
|
||||
"message": "Банковская карта отклонена",
|
||||
"unknown": "Причина неизвестна"
|
||||
},
|
||||
"message": "Платёжный интрумент отклонён",
|
||||
"unknown": "Неизвестный платёжный интрумент"
|
||||
"message": "Платёжный инструмент отклонён",
|
||||
"unknown": "Неизвестный платёжный инструмент"
|
||||
},
|
||||
"provider_limit_exceeded": {
|
||||
"amount": "Лимит на сумму",
|
||||
"message": "Превышен лимит на мерчанта у провайдера (вас или платформы RBKmoney)",
|
||||
"message": "Превышен лимит на мерчанта у провайдера (вас или платформы)",
|
||||
"number": "Лимит на количество попыток",
|
||||
"unknown": "Объект лимита неизвестен"
|
||||
},
|
||||
|
@ -114,10 +114,10 @@ export class DropdownTriggerDirective implements OnDestroy {
|
||||
}
|
||||
|
||||
private removeWindowListeners() {
|
||||
let unlisten = this.removeWindowListenersFns.pop();
|
||||
while (unlisten) {
|
||||
unlisten();
|
||||
unlisten = this.removeWindowListenersFns.pop();
|
||||
let unlisted = this.removeWindowListenersFns.pop();
|
||||
while (unlisted) {
|
||||
unlisted();
|
||||
unlisted = this.removeWindowListenersFns.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
@mixin mat-theme-loaded-marker-override() {
|
||||
// Supress warning message: "Could not find Angular Material core theme. ..."
|
||||
// Suppress warning message: "Could not find Angular Material core theme. ..."
|
||||
// Theme is added asynchronously and this check is not needed
|
||||
.mat-mdc-theme-loaded-marker {
|
||||
display: none;
|
||||
|
@ -9,7 +9,7 @@ describe('removeDictEmptyFields', () => {
|
||||
data = {
|
||||
a: '1',
|
||||
b: '22',
|
||||
c: '0afaf',
|
||||
c: '0test',
|
||||
d: '',
|
||||
e: '7',
|
||||
g: '',
|
||||
@ -18,7 +18,7 @@ describe('removeDictEmptyFields', () => {
|
||||
expect(removeDictEmptyFields(data)).toEqual({
|
||||
a: '1',
|
||||
b: '22',
|
||||
c: '0afaf',
|
||||
c: '0test',
|
||||
e: '7',
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user