Skip to content

Commit

Permalink
chore(*): nx migrate latest
Browse files Browse the repository at this point in the history
chore(*): test coverage flag is set in all jest configs
  • Loading branch information
csaszika committed May 23, 2021
1 parent 68774d0 commit 86fdc02
Show file tree
Hide file tree
Showing 60 changed files with 13,051 additions and 14,071 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"parserOptions": { "project": "./tsconfig.*?.json" },
"parserOptions": {
"project": "./tsconfig.*?.json"
},
"rules": {}
},
{
Expand Down
9 changes: 7 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@
"main": "apps/plan-it/src/main.ts",
"polyfills": "apps/plan-it/src/polyfills.ts",
"tsConfig": "apps/plan-it/tsconfig.app.json",
"aot": true,
"assets": ["apps/plan-it/src/favicon.ico", "apps/plan-it/src/assets"],
"styles": ["apps/plan-it/src/styles.scss", "./node_modules/@angular/material/prebuilt-themes/purple-green.css"],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down
22 changes: 19 additions & 3 deletions apps/plan-it/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,26 @@
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"parserOptions": { "project": ["apps/plan-it/tsconfig.*?.json"] },
"parserOptions": {
"project": ["apps/plan-it/tsconfig.*?.json"]
},
"rules": {
"@angular-eslint/directive-selector": ["error", { "type": "attribute", "prefix": "pi", "style": "camelCase" }],
"@angular-eslint/component-selector": ["error", { "type": "element", "prefix": "pi", "style": "kebab-case" }]
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "pi",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "pi",
"style": "kebab-case"
}
]
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions apps/plan-it/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = {
},
coverageDirectory: '../../coverage/apps/plan-it',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
2 changes: 1 addition & 1 deletion apps/plan-it/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion apps/plan-it/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
2 changes: 1 addition & 1 deletion apps/plan-it/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
// eslint-disable-next-line ordered-imports/ordered-imports
import '@angular-extensions/pretty-html-log';
// eslint-disable-next-line ordered-imports/ordered-imports
Expand Down
22 changes: 19 additions & 3 deletions libs/animations/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,26 @@
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"parserOptions": { "project": ["libs/animations/tsconfig.*?.json"] },
"parserOptions": {
"project": ["libs/animations/tsconfig.*?.json"]
},
"rules": {
"@angular-eslint/directive-selector": ["error", { "type": "attribute", "prefix": "pi", "style": "camelCase" }],
"@angular-eslint/component-selector": ["error", { "type": "element", "prefix": "pi", "style": "kebab-case" }]
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "pi",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "pi",
"style": "kebab-case"
}
]
}
},
{
Expand Down
6 changes: 5 additions & 1 deletion libs/design-core/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
},
"rules": {}
},
{ "files": ["*.html"], "extends": ["plugin:@nrwl/nx/angular-template"], "rules": {} }
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"rules": {}
}
]
}
28 changes: 24 additions & 4 deletions libs/environments/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,32 @@
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"parserOptions": { "project": ["libs/environments/tsconfig.*?.json"] },
"parserOptions": {
"project": ["libs/environments/tsconfig.*?.json"]
},
"rules": {
"@angular-eslint/directive-selector": ["error", { "type": "attribute", "prefix": "pi", "style": "camelCase" }],
"@angular-eslint/component-selector": ["error", { "type": "element", "prefix": "pi", "style": "kebab-case" }]
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "pi",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "pi",
"style": "kebab-case"
}
]
}
},
{ "files": ["*.html"], "extends": ["plugin:@nrwl/nx/angular-template"], "rules": {} }
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"rules": {}
}
]
}
8 changes: 4 additions & 4 deletions libs/environments/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
astTransformers: {
before: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer'],
},
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
coverageDirectory: '../../coverage/libs/environments',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
2 changes: 1 addition & 1 deletion libs/environments/src/lib/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion libs/environments/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
28 changes: 24 additions & 4 deletions libs/features/creatable-plan-list/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,32 @@
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"parserOptions": { "project": ["libs/features/creatable-plan-list/tsconfig.*?.json"] },
"parserOptions": {
"project": ["libs/features/creatable-plan-list/tsconfig.*?.json"]
},
"rules": {
"@angular-eslint/directive-selector": ["error", { "type": "attribute", "prefix": "pi", "style": "camelCase" }],
"@angular-eslint/component-selector": ["error", { "type": "element", "prefix": "pi", "style": "kebab-case" }]
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "pi",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "pi",
"style": "kebab-case"
}
]
}
},
{ "files": ["*.html"], "extends": ["plugin:@nrwl/nx/angular-template"], "rules": {} }
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"rules": {}
}
]
}
7 changes: 4 additions & 3 deletions libs/features/creatable-plan-list/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ module.exports = {
},
},
},
collectCoverage: true,
coverageDirectory: '../../../coverage/libs/features/creatable-plan-list',
coverageReporters: ['html', 'lcov'],
reporters: ['default'],
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
2 changes: 1 addition & 1 deletion libs/features/creatable-plan-list/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
import * as jestJqueryMatchers from 'jest-jquery-matchers';

jest.addMatchers(jestJqueryMatchers);
28 changes: 24 additions & 4 deletions libs/features/dashboard/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,32 @@
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"parserOptions": { "project": ["libs/features/dashboard/tsconfig.*?.json"] },
"parserOptions": {
"project": ["libs/features/dashboard/tsconfig.*?.json"]
},
"rules": {
"@angular-eslint/directive-selector": ["error", { "type": "attribute", "prefix": "pi", "style": "camelCase" }],
"@angular-eslint/component-selector": ["error", { "type": "element", "prefix": "pi", "style": "kebab-case" }]
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "pi",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "pi",
"style": "kebab-case"
}
]
}
},
{ "files": ["*.html"], "extends": ["plugin:@nrwl/nx/angular-template"], "rules": {} }
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"rules": {}
}
]
}
7 changes: 4 additions & 3 deletions libs/features/dashboard/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ module.exports = {
},
},
},
collectCoverage: true,
coverageDirectory: '../../../coverage/libs/features/dashboard',
coverageReporters: ['html', 'lcov'],
reporters: ['default'],
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
2 changes: 1 addition & 1 deletion libs/features/dashboard/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
import * as jestJqueryMatchers from 'jest-jquery-matchers';

jest.addMatchers(jestJqueryMatchers);
28 changes: 24 additions & 4 deletions libs/features/football-plans/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,32 @@
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"parserOptions": { "project": ["libs/features/football-plans/tsconfig.*?.json"] },
"parserOptions": {
"project": ["libs/features/football-plans/tsconfig.*?.json"]
},
"rules": {
"@angular-eslint/directive-selector": ["error", { "type": "attribute", "prefix": "pi", "style": "camelCase" }],
"@angular-eslint/component-selector": ["error", { "type": "element", "prefix": "pi", "style": "kebab-case" }]
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "pi",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "pi",
"style": "kebab-case"
}
]
}
},
{ "files": ["*.html"], "extends": ["plugin:@nrwl/nx/angular-template"], "rules": {} }
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"rules": {}
}
]
}
7 changes: 4 additions & 3 deletions libs/features/football-plans/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ module.exports = {
},
},
},
collectCoverage: true,
coverageDirectory: '../../../coverage/libs/features/football-plans',
coverageReporters: ['html', 'lcov'],
reporters: ['default'],
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
Loading

0 comments on commit 86fdc02

Please sign in to comment.