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

chore: update eslint and nx deps #3371

Merged
merged 5 commits into from
Apr 10, 2022
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
- write_master_hash
- run:
name: Run Affected E2E Tests
command: yarn nx affected --target=e2e --base=$(cat ~/project/master.txt) --head=$CIRCLE_SHA1 --headless --parallel
command: yarn nx affected --target=e2e --base=$(cat ~/project/master.txt) --head=$CIRCLE_SHA1 --parallel --exclude=docs-app
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why docs-app is getting picked up as a project that has the e2e target, that's why I just excluded it here 😅


deploy:
<<: *run_in_node
Expand Down
13 changes: 10 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_" }
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/naming-convention": [
"error",
"warn",
{
"selector": "default",
"format": ["camelCase"],
Expand Down Expand Up @@ -84,6 +88,10 @@
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
},
{
"selector": "objectLiteralMethod",
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
},
{
"selector": "objectLiteralProperty",
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
Expand Down Expand Up @@ -113,7 +121,6 @@
"undefined"
],
"id-match": "error",
"import/no-deprecated": "warn",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed because this was taking too long 😅

"no-eval": "off",
"no-redeclare": "off",
"no-underscore-dangle": "off",
Expand Down
4 changes: 3 additions & 1 deletion .nxignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.spec.ts
**/schematics-core/**
**/testing/**
modules/BUILD
modules/license-banner.txt
modules/README.md
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@
"outputs": ["coverage/modules/schematics"]
},
"build-package": {
"builder": "@nrwl/node:package",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in nrwl/nx#9086

"builder": "@nrwl/js:tsc",
"options": {
"outputPath": "dist/modules/schematics",
"tsConfig": "modules/schematics/tsconfig.build.json",
Expand Down Expand Up @@ -702,7 +702,7 @@
"schematics-core": {
"projectType": "library",
"root": "modules/schematics-core",
"sourceRoot": "modules/schematics-core/src",
"sourceRoot": "modules/schematics-core",
"prefix": "ngrx",
"architect": {
"lint": {
Expand Down
2 changes: 1 addition & 1 deletion modules/schematics-core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "schematics-core"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
Expand Down
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@
"@angular/platform-browser-dynamic": "13.0.0",
"@angular/platform-server": "13.0.0",
"@angular/router": "13.0.0",
"@applitools/eyes-cypress": "^3.4.12",
"@nrwl/angular": "13.2.2",
"@nrwl/angular": "13.10.0",
"core-js": "^2.5.4",
"opencollective": "^1.0.3",
"rxjs": "~7.4.0",
Expand All @@ -115,9 +114,11 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "13.0.1",
"@angular-eslint/eslint-plugin": "12.6.1",
"@angular-eslint/eslint-plugin-template": "12.6.1",
"@angular-eslint/template-parser": "12.6.1",
"@angular-eslint/builder": "13.2.0",
"@angular-eslint/eslint-plugin": "13.2.0",
"@angular-eslint/eslint-plugin-template": "13.2.0",
"@angular-eslint/schematics": "13.2.0",
"@angular-eslint/template-parser": "13.2.0",
"@angular/bazel": "^13.0.0",
"@angular/cli": "13.0.1",
"@angular/compiler-cli": "13.0.0",
Expand All @@ -127,16 +128,15 @@
"@bazel/ibazel": "0.12.4",
"@bazel/jasmine": "1.6.0",
"@bazel/typescript": "1.6.0",
"@cypress/webpack-preprocessor": "^4.0.3",
"@nrwl/cli": "13.2.2",
"@nrwl/cypress": "13.2.2",
"@nrwl/eslint-plugin-nx": "13.2.2",
"@nrwl/jest": "13.2.2",
"@nrwl/linter": "13.2.2",
"@nrwl/node": "13.2.2",
"@nrwl/nx-cloud": "12.5.4",
"@nrwl/tao": "13.2.2",
"@nrwl/workspace": "13.2.2",
"@nrwl/cli": "13.10.0",
"@nrwl/cypress": "13.10.0",
"@nrwl/eslint-plugin-nx": "13.10.0",
"@nrwl/jest": "13.10.0",
"@nrwl/linter": "13.10.0",
"@nrwl/node": "13.10.0",
"@nrwl/nx-cloud": "13.2.2",
"@nrwl/tao": "13.10.0",
"@nrwl/workspace": "13.10.0",
"@octokit/rest": "^15.17.0",
"@testing-library/cypress": "^7.0.1",
"@types/fs-extra": "^2.1.0",
Expand All @@ -152,20 +152,20 @@
"@types/prettier": "^1.19.0",
"@types/rimraf": "^0.0.28",
"@types/shelljs": "^0.8.5",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"chokidar": "^1.7.0",
"chokidar-cli": "^1.2.0",
"conventional-changelog": "^1.1.4",
"conventional-changelog-cli": "^1.3.21",
"coveralls": "^2.13.0",
"cpy-cli": "^1.0.1",
"cypress": "4.1.0",
"cypress": "9.5.3",
"deep-freeze": "^0.0.1",
"eslint": "7.32.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-import": "latest",
"eslint": "8.12.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "2.26.0",
"express": "^4.16.4",
"fs-extra": "^2.1.2",
"glob": "^7.1.2",
Expand Down
35 changes: 3 additions & 32 deletions projects/example-app-e2e/src/integration/round-trip.spec.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
context('Full round trip', () => {
before(() => {
// TODO: uncomment once Applitools work properly
// (cy as any).eyesOpen({
// appName: 'books_app',
// testName: 'round-trip',
// browser: { width: 800, height: 600 },
// });
window.localStorage.removeItem('books_app');
cy.visit('/');
});

beforeEach(() => {
(cy as any).restoreLocalStorage();
cy.restoreLocalStorage();
});

afterEach(() => {
(cy as any).saveLocalStorage();
});

after(() => {
// TODO: uncomment once Applitools work properly
// (cy as any).eyesClose();
cy.saveLocalStorage();
});

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

Expand All @@ -46,9 +31,6 @@ context('Full round trip', () => {
cy.contains('My Collection');
cy.findByRole('button', { name: /menu/i }).click();
cy.findByText(/browse books/i).click();

// TODO: uncomment once Applitools work properly
// (cy as any).eyesCheckWindow('is possible to search for books');
cy.findByRole('textbox', { name: /search for a book/i }).type(
'The Alchemist'
);
Expand All @@ -59,8 +41,6 @@ context('Full round trip', () => {
cy.get('bc-book-preview').eq(2).click();

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

cy.findByRole('button', { name: /add book to collection/i }).click();
cy.findByRole('button', { name: /remove book from collection/i }).click();

// TODO: uncomment once Applitools work properly
// (cy as any).eyesCheckWindow('is possible to remove books');
cy.findByRole('button', { name: /remove book from collection/i }).should(
'not.exist'
);
Expand All @@ -84,19 +61,13 @@ context('Full round trip', () => {
it('is possible to show the collection', () => {
cy.findByRole('button', { name: /menu/i }).click();
cy.findByText(/my collection/i).click();

// TODO: uncomment once Applitools work properly
// (cy as any).eyesCheckWindow('is possible to show the collection');
cy.get('bc-book-preview').its('length').should('be', 1);
cy.get('bc-book-preview').its('length').should('eq', 1);
});

it('is possible to sign out', () => {
cy.findByRole('button', { name: /menu/i }).click();
cy.findByText(/sign out/i).click();
cy.findByRole('button', { name: /ok/i }).click();

// TODO: uncomment once Applitools work properly
// (cy as any).eyesCheckWindow('is possible to sign out');
cy.findByRole('textbox', { name: /username/i }).should('exist');
cy.findByLabelText(/password/i).should('exist');
});
Expand Down
11 changes: 2 additions & 9 deletions projects/example-app-e2e/src/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,5 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor');

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config

// Preprocess Typescript file using Nx helper
on('file:preprocessor', preprocessTypescript(config));
};
// eslint-disable-next-line @typescript-eslint/no-empty-function
module.exports = () => {};
15 changes: 0 additions & 15 deletions projects/example-app-e2e/src/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@

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

//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

// TODO: uncomment once Applitools work properly
// import '@applitools/eyes-cypress/commands';

const LOCAL_STORAGE_MEMORY: any = {};

Cypress.Commands.add('saveLocalStorage', () => {
Expand Down
10 changes: 10 additions & 0 deletions projects/example-app-e2e/src/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,13 @@

// Import commands.js using ES2015 syntax:
import './commands';

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
saveLocalStorage(): Chainable<void>;
restoreLocalStorage(): Chainable<void>;
}
}
}
3 changes: 1 addition & 2 deletions projects/ngrx.io/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ export class AppComponent implements OnInit {
// Search related properties
showSearchResults = false;
searchResults: Observable<SearchResults>;
@ViewChildren('searchBox, searchResultsView', { read: ElementRef })
searchElements: QueryList<ElementRef>;
@ViewChildren('searchBox, searchResultsView', { read: ElementRef }) searchElements: QueryList<ElementRef>;
@ViewChild(SearchBoxComponent, { static: true }) searchBox: SearchBoxComponent;

@ViewChild(MatSidenav, { static: true }) sidenav: MatSidenav;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ $ ng g store State --root --module app.module.ts
export class CodeBlockComponent implements AfterContentInit {
@Input() code = '';

@ViewChild('codeContainer', { read: ElementRef, static: true })
codeContainer;
@ViewChild('codeContainer', { read: ElementRef, static: true }) codeContainer;

formattedCode = '';

Expand Down
3 changes: 1 addition & 2 deletions projects/ngrx.io/src/app/layout/doc-viewer/dt.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export class DtComponent {
@Input('doc') doc: DocumentContents;
@Output() docChange = new EventEmitter<DocumentContents>();

@ViewChild('dt', { read: ElementRef, static: true })
dt: ElementRef;
@ViewChild('dt', { read: ElementRef, static: true }) dt: ElementRef;

get text() {
return this.doc && this.doc.contents;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export class NotificationComponent implements OnInit {
@Input() expirationDate: string;
@Output() dismissed = new EventEmitter<void>();

@HostBinding('@hideAnimation')
showNotification: 'show'|'hide';
@HostBinding('@hideAnimation') showNotification: 'show'|'hide';

constructor(
@Inject(WindowToken) private window: Window,
Expand Down
Loading