Skip to content

Commit 6a8c65a

Browse files
committed
chore: format project by prettier rules
1 parent cc1287a commit 6a8c65a

File tree

87 files changed

+521
-512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+521
-512
lines changed

.commitlintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"extends": ["@commitlint/config-conventional"]
3-
}
3+
}

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ root = true
44
[*]
55
charset = utf-8
66
indent_style = space
7-
indent_size = 2
7+
indent_size = 4
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

.lintstagedrc

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
2-
"*.scss": [
3-
"stylelint --fix",
4-
"git add"
5-
],
6-
"./**/*.ts": [
7-
"eslint **/*.ts --fix",
8-
"git add"
9-
]
2+
"*": [
3+
"npx prettier **/*.html **/*.scss **/*.ts **/*.json --write",
4+
"git add"
5+
],
6+
"*.scss": ["stylelint --fix"],
7+
"./**/*.ts": ["eslint **/*.ts --fix"]
108
}

.prettierignore

+8
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22

33
/dist
44
/coverage
5+
/node_modules
6+
/.firebase
7+
/.angular
8+
/.github
9+
/.husky
10+
/.vscode
11+
/.dist
12+
/tools

.prettierrc

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"singleQuote": true,
3-
"tabWidth": 4,
4-
"endOfLine": "auto"
2+
"singleQuote": true,
3+
"tabWidth": 4,
4+
"endOfLine": "auto",
5+
"bracketSameLine": true,
6+
"printWidth": 80,
7+
"arrowParens": "always",
8+
"bracketSpacing": true,
9+
"trailingComma": "none"
510
}

.stylelintrc.json

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
{
2-
"extends": "stylelint-config-sass-guidelines",
3-
"plugins": ["stylelint-prettier"],
4-
"rules": {
5-
"indentation": 4,
6-
"max-nesting-depth": 6,
7-
"selector-max-compound-selectors": 6,
8-
"scss/at-import-partial-extension-blacklist": "off",
9-
"scss/at-extend-no-missing-placeholder": null,
10-
"selector-no-qualifying-type": null,
11-
"order/properties-alphabetical-order": null,
12-
"order/order": null,
13-
"property-no-vendor-prefix": [
14-
true,
15-
{
16-
"ignoreProperties": ["box-orient"]
17-
}
18-
],
19-
"value-no-vendor-prefix": [
20-
true,
21-
{
22-
"ignoreValues": ["box"]
23-
}
24-
],
25-
"selector-pseudo-element-no-unknown": [
26-
true,
27-
{
28-
"ignorePseudoElements": ["ng-deep"]
29-
}
30-
],
31-
"selector-class-pattern": [
32-
"^([a-z][a-z]*)(-[a-z]+)*(__([a-z][a-z]*)(-[a-z]+)*)*(_([a-z][a-z]*)(-[a-z]+)*)*$",
33-
{
34-
"resolveNestedSelectors": true
35-
}
36-
]
37-
}
2+
"extends": "stylelint-config-sass-guidelines",
3+
"plugins": ["stylelint-prettier"],
4+
"rules": {
5+
"indentation": 4,
6+
"max-nesting-depth": 6,
7+
"selector-max-compound-selectors": 6,
8+
"scss/at-import-partial-extension-blacklist": "off",
9+
"scss/at-extend-no-missing-placeholder": null,
10+
"selector-no-qualifying-type": null,
11+
"order/properties-alphabetical-order": null,
12+
"order/order": null,
13+
"property-no-vendor-prefix": [
14+
true,
15+
{
16+
"ignoreProperties": ["box-orient"]
17+
}
18+
],
19+
"value-no-vendor-prefix": [
20+
true,
21+
{
22+
"ignoreValues": ["box"]
23+
}
24+
],
25+
"selector-pseudo-element-no-unknown": [
26+
true,
27+
{
28+
"ignorePseudoElements": ["ng-deep"]
29+
}
30+
],
31+
"selector-class-pattern": [
32+
"^([a-z][a-z]*)(-[a-z]+)*(__([a-z][a-z]*)(-[a-z]+)*)*(_([a-z][a-z]*)(-[a-z]+)*)*$",
33+
{
34+
"resolveNestedSelectors": true
35+
}
36+
]
37+
}
3838
}

.vscode/settings.json

+5-9
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@
2020
"editor.wordWrap": "off"
2121
},
2222
"editor.guides.bracketPairs": true,
23-
"eslint.validate": [
24-
"javascript",
25-
"typescript",
26-
],
23+
"eslint.validate": ["javascript", "typescript"],
2724
"stylelint.config": null,
28-
"stylelint.validate": [
29-
"scss"
30-
],
31-
"cSpell.language": "en,uk"
32-
}
25+
"stylelint.validate": ["scss"],
26+
"cSpell.language": "en,uk",
27+
"editor.formatOnSave": true
28+
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "Using fixtures to represent data",
3-
"email": "[email protected]"
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]"
44
}

apps/code-review-e2e/tsconfig.json

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"sourceMap": false,
5-
"outDir": "../../dist/out-tsc",
6-
"allowJs": true,
7-
"types": ["cypress", "node"],
8-
"forceConsistentCasingInFileNames": true,
9-
"strict": true,
10-
"noImplicitOverride": true,
11-
"noPropertyAccessFromIndexSignature": true,
12-
"noImplicitReturns": true,
13-
"noFallthroughCasesInSwitch": true
14-
},
15-
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"],
16-
"angularCompilerOptions": {
17-
"enableI18nLegacyMessageIdFormat": false,
18-
"strictInjectionParameters": true,
19-
"strictInputAccessModifiers": true,
20-
"strictTemplates": true
21-
}
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"sourceMap": false,
5+
"outDir": "../../dist/out-tsc",
6+
"allowJs": true,
7+
"types": ["cypress", "node"],
8+
"forceConsistentCasingInFileNames": true,
9+
"strict": true,
10+
"noImplicitOverride": true,
11+
"noPropertyAccessFromIndexSignature": true,
12+
"noImplicitReturns": true,
13+
"noFallthroughCasesInSwitch": true
14+
},
15+
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"],
16+
"angularCompilerOptions": {
17+
"enableI18nLegacyMessageIdFormat": false,
18+
"strictInjectionParameters": true,
19+
"strictInputAccessModifiers": true,
20+
"strictTemplates": true
21+
}
2222
}

apps/code-review/jest.config.ts

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/* eslint-disable */
22
export default {
3-
displayName: 'code-review',
4-
preset: '../../jest.preset.js',
5-
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6-
globals: {
7-
'ts-jest': {
8-
tsconfig: '<rootDir>/tsconfig.spec.json',
9-
stringifyContentPathRegex: '\\.(html|svg)$',
3+
displayName: 'code-review',
4+
preset: '../../jest.preset.js',
5+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6+
globals: {
7+
'ts-jest': {
8+
tsconfig: '<rootDir>/tsconfig.spec.json',
9+
stringifyContentPathRegex: '\\.(html|svg)$'
10+
}
1011
},
11-
},
12-
coverageDirectory: '../../coverage/apps/code-review',
13-
transform: {
14-
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
15-
},
16-
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
17-
snapshotSerializers: [
18-
'jest-preset-angular/build/serializers/no-ng-attributes',
19-
'jest-preset-angular/build/serializers/ng-snapshot',
20-
'jest-preset-angular/build/serializers/html-comment',
21-
],
12+
coverageDirectory: '../../coverage/apps/code-review',
13+
transform: {
14+
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular'
15+
},
16+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
17+
snapshotSerializers: [
18+
'jest-preset-angular/build/serializers/no-ng-attributes',
19+
'jest-preset-angular/build/serializers/ng-snapshot',
20+
'jest-preset-angular/build/serializers/html-comment'
21+
]
2222
};

apps/code-review/src/app/app.routes.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export const APP_ROUTES: Route[] = [
44
{
55
path: '',
66
loadChildren: () =>
7-
import('./remote-entry/entry.module').then((m) => m.RemoteEntryModule)
7+
import('./remote-entry/entry.module').then(
8+
(m) => m.RemoteEntryModule
9+
)
810
}
911
];
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export enum AppRouteEnum {
22
Request = 'request',
33
Overview = 'overview',
4-
List = 'list',
4+
List = 'list'
55
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from './app-route-enum';
2-
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export enum CodeReviewRequestStatusEnum {
2-
Opened = 1,
3-
Closed = 2
2+
Opened = 1,
3+
Closed = 2
44
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { CodeReviewRequestStatusEnum } from '@code-review/enums';
22

33
export interface CodeReviewRequest {
4-
readonly id: string;
5-
readonly user: any;
6-
readonly status: CodeReviewRequestStatusEnum;
7-
readonly stackblitzUrl: string;
8-
readonly date: string;
4+
readonly id: string;
5+
readonly user: any;
6+
readonly status: CodeReviewRequestStatusEnum;
7+
readonly stackblitzUrl: string;
8+
readonly date: string;
99
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="all-requests">
22
<h2>Список запитів на код-ревью</h2>
33
<div class="request-list">
4-
<acua-requests-table></acua-requests-table>
4+
<acua-requests-table></acua-requests-table>
55
</div>
66
</div>

apps/code-review/src/app/pages/list/components/all-requests/all-requests.component.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
33
@Component({
44
selector: 'acua-all-requests',
55
templateUrl: './all-requests.component.html',
6-
styleUrls: ['./all-requests.component.scss', '../../styles/request-styles.scss'],
6+
styleUrls: [
7+
'./all-requests.component.scss',
8+
'../../styles/request-styles.scss'
9+
],
710
changeDetection: ChangeDetectionStrategy.OnPush
811
})
9-
export class AllRequestsComponent {}
12+
export class AllRequestsComponent {
13+
constructor() {
14+
console.log('pk');
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from './all-requests.component';
2-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="historical-requests">
22
<h2>Список історичних запитів на код-ревью</h2>
33
<div class="request-list">
4-
<acua-requests-table></acua-requests-table>
4+
<acua-requests-table></acua-requests-table>
55
</div>
66
</div>

apps/code-review/src/app/pages/list/components/historical-requests/historical-requests.component.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
33
@Component({
44
selector: 'acua-historical-requests',
55
templateUrl: './historical-requests.component.html',
6-
styleUrls: ['./historical-requests.component.scss', '../../styles/request-styles.scss'],
6+
styleUrls: [
7+
'./historical-requests.component.scss',
8+
'../../styles/request-styles.scss'
9+
],
710
changeDetection: ChangeDetectionStrategy.OnPush
811
})
912
export class HistoricalRequestsComponent {}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
21
export * from './historical-requests.component';
3-

apps/code-review/src/app/pages/list/components/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ export * from './all-requests';
22
export * from './historical-requests';
33
export * from './my-requests';
44
export * from './requests-table';
5-
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from './my-requests.component';
2-

0 commit comments

Comments
 (0)