Skip to content

Commit 4aa0a0c

Browse files
chore: update eslint and nx deps (#3371)
1 parent 25e97a9 commit 4aa0a0c

File tree

15 files changed

+1442
-1964
lines changed

15 files changed

+1442
-1964
lines changed

Diff for: .circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
- write_master_hash
236236
- run:
237237
name: Run Affected E2E Tests
238-
command: yarn nx affected --target=e2e --base=$(cat ~/project/master.txt) --head=$CIRCLE_SHA1 --headless --parallel
238+
command: yarn nx affected --target=e2e --base=$(cat ~/project/master.txt) --head=$CIRCLE_SHA1 --parallel --exclude=docs-app
239239

240240
deploy:
241241
<<: *run_in_node

Diff for: .eslintrc.json

+10-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@
3636
"@typescript-eslint/no-explicit-any": "off",
3737
"@typescript-eslint/no-unused-vars": [
3838
"warn",
39-
{ "argsIgnorePattern": "^_" }
39+
{
40+
"argsIgnorePattern": "^_",
41+
"varsIgnorePattern": "^_",
42+
"caughtErrorsIgnorePattern": "^_"
43+
}
4044
],
4145
"@typescript-eslint/naming-convention": [
42-
"error",
46+
"warn",
4347
{
4448
"selector": "default",
4549
"format": ["camelCase"],
@@ -84,6 +88,10 @@
8488
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
8589
"leadingUnderscore": "allow"
8690
},
91+
{
92+
"selector": "objectLiteralMethod",
93+
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
94+
},
8795
{
8896
"selector": "objectLiteralProperty",
8997
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
@@ -113,7 +121,6 @@
113121
"undefined"
114122
],
115123
"id-match": "error",
116-
"import/no-deprecated": "warn",
117124
"no-eval": "off",
118125
"no-redeclare": "off",
119126
"no-underscore-dangle": "off",

Diff for: .nxignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
*.spec.ts
2-
**/schematics-core/**
32
**/testing/**
3+
modules/BUILD
4+
modules/license-banner.txt
5+
modules/README.md

Diff for: angular.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@
636636
"outputs": ["coverage/modules/schematics"]
637637
},
638638
"build-package": {
639-
"builder": "@nrwl/node:package",
639+
"builder": "@nrwl/js:tsc",
640640
"options": {
641641
"outputPath": "dist/modules/schematics",
642642
"tsConfig": "modules/schematics/tsconfig.build.json",
@@ -702,7 +702,7 @@
702702
"schematics-core": {
703703
"projectType": "library",
704704
"root": "modules/schematics-core",
705-
"sourceRoot": "modules/schematics-core/src",
705+
"sourceRoot": "modules/schematics-core",
706706
"prefix": "ngrx",
707707
"architect": {
708708
"lint": {

Diff for: modules/schematics-core/.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": ["../../.eslintrc.json"],
3-
"ignorePatterns": ["!**/*", "schematics-core"],
3+
"ignorePatterns": ["!**/*"],
44
"overrides": [
55
{
66
"files": ["*.ts"],

Diff for: package.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@
105105
"@angular/platform-browser-dynamic": "13.0.0",
106106
"@angular/platform-server": "13.0.0",
107107
"@angular/router": "13.0.0",
108-
"@applitools/eyes-cypress": "^3.4.12",
109-
"@nrwl/angular": "13.2.2",
108+
"@nrwl/angular": "13.10.0",
110109
"core-js": "^2.5.4",
111110
"opencollective": "^1.0.3",
112111
"rxjs": "~7.4.0",
@@ -115,9 +114,11 @@
115114
},
116115
"devDependencies": {
117116
"@angular-devkit/build-angular": "13.0.1",
118-
"@angular-eslint/eslint-plugin": "12.6.1",
119-
"@angular-eslint/eslint-plugin-template": "12.6.1",
120-
"@angular-eslint/template-parser": "12.6.1",
117+
"@angular-eslint/builder": "13.2.0",
118+
"@angular-eslint/eslint-plugin": "13.2.0",
119+
"@angular-eslint/eslint-plugin-template": "13.2.0",
120+
"@angular-eslint/schematics": "13.2.0",
121+
"@angular-eslint/template-parser": "13.2.0",
121122
"@angular/bazel": "^13.0.0",
122123
"@angular/cli": "13.0.1",
123124
"@angular/compiler-cli": "13.0.0",
@@ -127,16 +128,15 @@
127128
"@bazel/ibazel": "0.12.4",
128129
"@bazel/jasmine": "1.6.0",
129130
"@bazel/typescript": "1.6.0",
130-
"@cypress/webpack-preprocessor": "^4.0.3",
131-
"@nrwl/cli": "13.2.2",
132-
"@nrwl/cypress": "13.2.2",
133-
"@nrwl/eslint-plugin-nx": "13.2.2",
134-
"@nrwl/jest": "13.2.2",
135-
"@nrwl/linter": "13.2.2",
136-
"@nrwl/node": "13.2.2",
137-
"@nrwl/nx-cloud": "12.5.4",
138-
"@nrwl/tao": "13.2.2",
139-
"@nrwl/workspace": "13.2.2",
131+
"@nrwl/cli": "13.10.0",
132+
"@nrwl/cypress": "13.10.0",
133+
"@nrwl/eslint-plugin-nx": "13.10.0",
134+
"@nrwl/jest": "13.10.0",
135+
"@nrwl/linter": "13.10.0",
136+
"@nrwl/node": "13.10.0",
137+
"@nrwl/nx-cloud": "13.2.2",
138+
"@nrwl/tao": "13.10.0",
139+
"@nrwl/workspace": "13.10.0",
140140
"@octokit/rest": "^15.17.0",
141141
"@testing-library/cypress": "^7.0.1",
142142
"@types/fs-extra": "^2.1.0",
@@ -152,20 +152,20 @@
152152
"@types/prettier": "^1.19.0",
153153
"@types/rimraf": "^0.0.28",
154154
"@types/shelljs": "^0.8.5",
155-
"@typescript-eslint/eslint-plugin": "4.33.0",
156-
"@typescript-eslint/parser": "4.33.0",
155+
"@typescript-eslint/eslint-plugin": "^5.18.0",
156+
"@typescript-eslint/parser": "^5.18.0",
157157
"chokidar": "^1.7.0",
158158
"chokidar-cli": "^1.2.0",
159159
"conventional-changelog": "^1.1.4",
160160
"conventional-changelog-cli": "^1.3.21",
161161
"coveralls": "^2.13.0",
162162
"cpy-cli": "^1.0.1",
163-
"cypress": "4.1.0",
163+
"cypress": "9.5.3",
164164
"deep-freeze": "^0.0.1",
165-
"eslint": "7.32.0",
166-
"eslint-config-prettier": "8.1.0",
167-
"eslint-plugin-cypress": "^2.10.3",
168-
"eslint-plugin-import": "latest",
165+
"eslint": "8.12.0",
166+
"eslint-config-prettier": "8.5.0",
167+
"eslint-plugin-cypress": "^2.12.1",
168+
"eslint-plugin-import": "2.26.0",
169169
"express": "^4.16.4",
170170
"fs-extra": "^2.1.2",
171171
"glob": "^7.1.2",

Diff for: projects/example-app-e2e/src/integration/round-trip.spec.ts

+3-32
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
11
context('Full round trip', () => {
22
before(() => {
3-
// TODO: uncomment once Applitools work properly
4-
// (cy as any).eyesOpen({
5-
// appName: 'books_app',
6-
// testName: 'round-trip',
7-
// browser: { width: 800, height: 600 },
8-
// });
93
window.localStorage.removeItem('books_app');
104
cy.visit('/');
115
});
126

137
beforeEach(() => {
14-
(cy as any).restoreLocalStorage();
8+
cy.restoreLocalStorage();
159
});
1610

1711
afterEach(() => {
18-
(cy as any).saveLocalStorage();
19-
});
20-
21-
after(() => {
22-
// TODO: uncomment once Applitools work properly
23-
// (cy as any).eyesClose();
12+
cy.saveLocalStorage();
2413
});
2514

2615
it('shows a message when the credentials are wrong', () => {
@@ -29,10 +18,6 @@ context('Full round trip', () => {
2918
.type('wronguser');
3019
cy.findByLabelText(/password/i).type('supersafepassword');
3120
cy.findByRole('button', { name: /login/i }).click();
32-
// TODO: uncomment once Applitools work properly
33-
// (cy as any).eyesCheckWindow(
34-
// 'show a message when the credentials are wrong'
35-
// );
3621
cy.contains('Invalid username or password').should('be.visible');
3722
});
3823

@@ -46,9 +31,6 @@ context('Full round trip', () => {
4631
cy.contains('My Collection');
4732
cy.findByRole('button', { name: /menu/i }).click();
4833
cy.findByText(/browse books/i).click();
49-
50-
// TODO: uncomment once Applitools work properly
51-
// (cy as any).eyesCheckWindow('is possible to search for books');
5234
cy.findByRole('textbox', { name: /search for a book/i }).type(
5335
'The Alchemist'
5436
);
@@ -59,8 +41,6 @@ context('Full round trip', () => {
5941
cy.get('bc-book-preview').eq(2).click();
6042

6143
cy.findByRole('button', { name: /add book to collection/i }).click();
62-
// TODO: uncomment once Applitools work properly
63-
// (cy as any).eyesCheckWindow('is possible to add books');
6444
cy.findByRole('button', { name: /add book to collection/i }).should(
6545
'not.exist'
6646
);
@@ -73,9 +53,6 @@ context('Full round trip', () => {
7353

7454
cy.findByRole('button', { name: /add book to collection/i }).click();
7555
cy.findByRole('button', { name: /remove book from collection/i }).click();
76-
77-
// TODO: uncomment once Applitools work properly
78-
// (cy as any).eyesCheckWindow('is possible to remove books');
7956
cy.findByRole('button', { name: /remove book from collection/i }).should(
8057
'not.exist'
8158
);
@@ -84,19 +61,13 @@ context('Full round trip', () => {
8461
it('is possible to show the collection', () => {
8562
cy.findByRole('button', { name: /menu/i }).click();
8663
cy.findByText(/my collection/i).click();
87-
88-
// TODO: uncomment once Applitools work properly
89-
// (cy as any).eyesCheckWindow('is possible to show the collection');
90-
cy.get('bc-book-preview').its('length').should('be', 1);
64+
cy.get('bc-book-preview').its('length').should('eq', 1);
9165
});
9266

9367
it('is possible to sign out', () => {
9468
cy.findByRole('button', { name: /menu/i }).click();
9569
cy.findByText(/sign out/i).click();
9670
cy.findByRole('button', { name: /ok/i }).click();
97-
98-
// TODO: uncomment once Applitools work properly
99-
// (cy as any).eyesCheckWindow('is possible to sign out');
10071
cy.findByRole('textbox', { name: /username/i }).should('exist');
10172
cy.findByLabelText(/password/i).should('exist');
10273
});

Diff for: projects/example-app-e2e/src/plugins/index.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,5 @@
1111
// This function is called when a project is opened or re-opened (e.g. due to
1212
// the project's config changing)
1313

14-
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor');
15-
16-
module.exports = (on, config) => {
17-
// `on` is used to hook into various events Cypress emits
18-
// `config` is the resolved Cypress config
19-
20-
// Preprocess Typescript file using Nx helper
21-
on('file:preprocessor', preprocessTypescript(config));
22-
};
14+
// eslint-disable-next-line @typescript-eslint/no-empty-function
15+
module.exports = () => {};

Diff for: projects/example-app-e2e/src/support/commands.ts

-15
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@
1010

1111
import '@testing-library/cypress/add-commands';
1212

13-
//
14-
// -- This is a child command --
15-
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
16-
//
17-
//
18-
// -- This is a dual command --
19-
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
20-
//
21-
//
22-
// -- This will overwrite an existing command --
23-
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
24-
25-
// TODO: uncomment once Applitools work properly
26-
// import '@applitools/eyes-cypress/commands';
27-
2813
const LOCAL_STORAGE_MEMORY: any = {};
2914

3015
Cypress.Commands.add('saveLocalStorage', () => {

Diff for: projects/example-app-e2e/src/support/index.ts

+10
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,13 @@
1515

1616
// Import commands.js using ES2015 syntax:
1717
import './commands';
18+
19+
declare global {
20+
// eslint-disable-next-line @typescript-eslint/no-namespace
21+
namespace Cypress {
22+
interface Chainable {
23+
saveLocalStorage(): Chainable<void>;
24+
restoreLocalStorage(): Chainable<void>;
25+
}
26+
}
27+
}

Diff for: projects/ngrx.io/src/app/app.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ export class AppComponent implements OnInit {
100100
// Search related properties
101101
showSearchResults = false;
102102
searchResults: Observable<SearchResults>;
103-
@ViewChildren('searchBox, searchResultsView', { read: ElementRef })
104-
searchElements: QueryList<ElementRef>;
103+
@ViewChildren('searchBox, searchResultsView', { read: ElementRef }) searchElements: QueryList<ElementRef>;
105104
@ViewChild(SearchBoxComponent, { static: true }) searchBox: SearchBoxComponent;
106105

107106
@ViewChild(MatSidenav, { static: true }) sidenav: MatSidenav;

Diff for: projects/ngrx.io/src/app/custom-elements/ngrx/code-block.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ $ ng g store State --root --module app.module.ts
3434
export class CodeBlockComponent implements AfterContentInit {
3535
@Input() code = '';
3636

37-
@ViewChild('codeContainer', { read: ElementRef, static: true })
38-
codeContainer;
37+
@ViewChild('codeContainer', { read: ElementRef, static: true }) codeContainer;
3938

4039
formattedCode = '';
4140

Diff for: projects/ngrx.io/src/app/layout/doc-viewer/dt.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ export class DtComponent {
1818
@Input('doc') doc: DocumentContents;
1919
@Output() docChange = new EventEmitter<DocumentContents>();
2020

21-
@ViewChild('dt', { read: ElementRef, static: true })
22-
dt: ElementRef;
21+
@ViewChild('dt', { read: ElementRef, static: true }) dt: ElementRef;
2322

2423
get text() {
2524
return this.doc && this.doc.contents;

Diff for: projects/ngrx.io/src/app/layout/notification/notification.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export class NotificationComponent implements OnInit {
2929
@Input() expirationDate: string;
3030
@Output() dismissed = new EventEmitter<void>();
3131

32-
@HostBinding('@hideAnimation')
33-
showNotification: 'show'|'hide';
32+
@HostBinding('@hideAnimation') showNotification: 'show'|'hide';
3433

3534
constructor(
3635
@Inject(WindowToken) private window: Window,

0 commit comments

Comments
 (0)