Skip to content

Commit

Permalink
Remove named Pjax export (#119)
Browse files Browse the repository at this point in the history
- Use eslint-plugin-import >= 2.24.1
  • Loading branch information
PaperStrike authored Aug 20, 2021
1 parent bb62b89 commit f27cfc3
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 34 deletions.
52 changes: 25 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"eslint": "^7.26.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-airbnb-typescript": "^13.0.0",
"eslint-plugin-import": "^2.23.2",
"eslint-plugin-import": "^2.24.1",
"eslint-plugin-jest": "^24.4.0",
"jest": "^27.0.1",
"jest-environment-jsdom": "^27.0.1",
Expand Down
3 changes: 2 additions & 1 deletion src/__mocks__/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Pjax, Options } from '..';
import type Pjax from '..';
import type { Options } from '..';

export default class MockedPjax implements Pjax {
history!: Pjax['history'];
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface EventDetail {
error?: unknown;
}

export class Pjax {
class Pjax {
static switches = Switches;

static reload(): void {
Expand Down
3 changes: 2 additions & 1 deletion src/preparePage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Pjax, Options, SwitchesResult } from '.';
import type Pjax from '.';
import type { Options, SwitchesResult } from '.';

import executeScripts from './libs/executeScripts';

Expand Down
3 changes: 2 additions & 1 deletion src/switchDOM.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Pjax, Options, EventDetail } from '.';
import type Pjax from '.';
import type { Options, EventDetail } from '.';
import switchNodes from './utils/switchNodes';

export default async function switchDOM(
Expand Down
2 changes: 1 addition & 1 deletion src/utils/DefaultTrigger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Pjax } from '..';
import type Pjax from '..';
import Submission from '../libs/Submission';

type Link = HTMLAnchorElement | HTMLAreaElement;
Expand Down
3 changes: 2 additions & 1 deletion src/weakLoad.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Pjax, Options } from '.';
import type Pjax from '.';
import type { Options } from '.';

/**
* Load a URL in Pjax way. Throw all errors.
Expand Down

0 comments on commit f27cfc3

Please sign in to comment.