From e25a31387a9a08845a61991af16909f989641e92 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 22 Apr 2020 14:02:51 +0200 Subject: [PATCH] refactor: rename files to camelCase --- __tests__/guards/{global-after.spec.ts => afterEach.spec.ts} | 0 .../guards/{global-beforeEach.spec.ts => beforeEach.spec.ts} | 0 .../guards/{route-beforeEnter.spec.ts => beforeEnter.spec.ts} | 0 ...nent-beforeRouteEnter.spec.ts => beforeRouteEnter.spec.ts} | 0 ...nent-beforeRouteLeave.spec.ts => beforeRouteLeave.spec.ts} | 0 ...nt-beforeRouteUpdate.spec.ts => beforeRouteUpdate.spec.ts} | 0 __tests__/matcher/{path-parser.spec.ts => pathParser.spec.ts} | 4 ++-- .../matcher/{path-ranking.spec.ts => pathRanking.spec.ts} | 4 ++-- __tests__/{url-encoding.spec.ts => urlEncoding.spec.ts} | 0 src/matcher/index.ts | 4 ++-- src/matcher/{path-matcher.ts => pathMatcher.ts} | 4 ++-- src/matcher/{path-parser-ranker.ts => pathParserRanker.ts} | 2 +- src/matcher/{path-tokenizer.ts => pathTokenizer.ts} | 0 src/types/index.ts | 4 ++-- src/types/{type-guards.ts => typeGuards.ts} | 0 15 files changed, 11 insertions(+), 11 deletions(-) rename __tests__/guards/{global-after.spec.ts => afterEach.spec.ts} (100%) rename __tests__/guards/{global-beforeEach.spec.ts => beforeEach.spec.ts} (100%) rename __tests__/guards/{route-beforeEnter.spec.ts => beforeEnter.spec.ts} (100%) rename __tests__/guards/{component-beforeRouteEnter.spec.ts => beforeRouteEnter.spec.ts} (100%) rename __tests__/guards/{component-beforeRouteLeave.spec.ts => beforeRouteLeave.spec.ts} (100%) rename __tests__/guards/{component-beforeRouteUpdate.spec.ts => beforeRouteUpdate.spec.ts} (100%) rename __tests__/matcher/{path-parser.spec.ts => pathParser.spec.ts} (99%) rename __tests__/matcher/{path-ranking.spec.ts => pathRanking.spec.ts} (98%) rename __tests__/{url-encoding.spec.ts => urlEncoding.spec.ts} (100%) rename src/matcher/{path-matcher.ts => pathMatcher.ts} (93%) rename src/matcher/{path-parser-ranker.ts => pathParserRanker.ts} (99%) rename src/matcher/{path-tokenizer.ts => pathTokenizer.ts} (100%) rename src/types/{type-guards.ts => typeGuards.ts} (100%) diff --git a/__tests__/guards/global-after.spec.ts b/__tests__/guards/afterEach.spec.ts similarity index 100% rename from __tests__/guards/global-after.spec.ts rename to __tests__/guards/afterEach.spec.ts diff --git a/__tests__/guards/global-beforeEach.spec.ts b/__tests__/guards/beforeEach.spec.ts similarity index 100% rename from __tests__/guards/global-beforeEach.spec.ts rename to __tests__/guards/beforeEach.spec.ts diff --git a/__tests__/guards/route-beforeEnter.spec.ts b/__tests__/guards/beforeEnter.spec.ts similarity index 100% rename from __tests__/guards/route-beforeEnter.spec.ts rename to __tests__/guards/beforeEnter.spec.ts diff --git a/__tests__/guards/component-beforeRouteEnter.spec.ts b/__tests__/guards/beforeRouteEnter.spec.ts similarity index 100% rename from __tests__/guards/component-beforeRouteEnter.spec.ts rename to __tests__/guards/beforeRouteEnter.spec.ts diff --git a/__tests__/guards/component-beforeRouteLeave.spec.ts b/__tests__/guards/beforeRouteLeave.spec.ts similarity index 100% rename from __tests__/guards/component-beforeRouteLeave.spec.ts rename to __tests__/guards/beforeRouteLeave.spec.ts diff --git a/__tests__/guards/component-beforeRouteUpdate.spec.ts b/__tests__/guards/beforeRouteUpdate.spec.ts similarity index 100% rename from __tests__/guards/component-beforeRouteUpdate.spec.ts rename to __tests__/guards/beforeRouteUpdate.spec.ts diff --git a/__tests__/matcher/path-parser.spec.ts b/__tests__/matcher/pathParser.spec.ts similarity index 99% rename from __tests__/matcher/path-parser.spec.ts rename to __tests__/matcher/pathParser.spec.ts index 29459bcd..6225d6c1 100644 --- a/__tests__/matcher/path-parser.spec.ts +++ b/__tests__/matcher/pathParser.spec.ts @@ -1,5 +1,5 @@ -import { tokenizePath, TokenType } from '../../src/matcher/path-tokenizer' -import { tokensToParser } from '../../src/matcher/path-parser-ranker' +import { tokenizePath, TokenType } from '../../src/matcher/pathTokenizer' +import { tokensToParser } from '../../src/matcher/pathParserRanker' describe('Path parser', () => { describe('tokenizer', () => { diff --git a/__tests__/matcher/path-ranking.spec.ts b/__tests__/matcher/pathRanking.spec.ts similarity index 98% rename from __tests__/matcher/path-ranking.spec.ts rename to __tests__/matcher/pathRanking.spec.ts index 3006e39c..f437fed0 100644 --- a/__tests__/matcher/path-ranking.spec.ts +++ b/__tests__/matcher/pathRanking.spec.ts @@ -1,8 +1,8 @@ -import { tokenizePath } from '../../src/matcher/path-tokenizer' +import { tokenizePath } from '../../src/matcher/pathTokenizer' import { tokensToParser, comparePathParserScore, -} from '../../src/matcher/path-parser-ranker' +} from '../../src/matcher/pathParserRanker' type PathParserOptions = Parameters[1] diff --git a/__tests__/url-encoding.spec.ts b/__tests__/urlEncoding.spec.ts similarity index 100% rename from __tests__/url-encoding.spec.ts rename to __tests__/urlEncoding.spec.ts diff --git a/src/matcher/index.ts b/src/matcher/index.ts index 1d57d07f..fc50f584 100644 --- a/src/matcher/index.ts +++ b/src/matcher/index.ts @@ -6,13 +6,13 @@ import { RouteRecordName, } from '../types' import { createRouterError, ErrorTypes, MatcherError } from '../errors' -import { createRouteRecordMatcher, RouteRecordMatcher } from './path-matcher' +import { createRouteRecordMatcher, RouteRecordMatcher } from './pathMatcher' import { RouteRecordRedirect, RouteRecordNormalized } from './types' import { PathParams, comparePathParserScore, PathParserOptions, -} from './path-parser-ranker' +} from './pathParserRanker' let noop = () => {} diff --git a/src/matcher/path-matcher.ts b/src/matcher/pathMatcher.ts similarity index 93% rename from src/matcher/path-matcher.ts rename to src/matcher/pathMatcher.ts index c64b2a13..0132a111 100644 --- a/src/matcher/path-matcher.ts +++ b/src/matcher/pathMatcher.ts @@ -3,8 +3,8 @@ import { tokensToParser, PathParser, PathParserOptions, -} from './path-parser-ranker' -import { tokenizePath } from './path-tokenizer' +} from './pathParserRanker' +import { tokenizePath } from './pathTokenizer' export interface RouteRecordMatcher extends PathParser { record: RouteRecord diff --git a/src/matcher/path-parser-ranker.ts b/src/matcher/pathParserRanker.ts similarity index 99% rename from src/matcher/path-parser-ranker.ts rename to src/matcher/pathParserRanker.ts index 3d6deac2..31511de2 100644 --- a/src/matcher/path-parser-ranker.ts +++ b/src/matcher/pathParserRanker.ts @@ -1,4 +1,4 @@ -import { Token, TokenType } from './path-tokenizer' +import { Token, TokenType } from './pathTokenizer' export type PathParams = Record diff --git a/src/matcher/path-tokenizer.ts b/src/matcher/pathTokenizer.ts similarity index 100% rename from src/matcher/path-tokenizer.ts rename to src/matcher/pathTokenizer.ts diff --git a/src/types/index.ts b/src/types/index.ts index f2b7631c..a8eb7f7d 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,5 +1,5 @@ import { LocationQuery, LocationQueryRaw } from '../utils/query' -import { PathParserOptions } from '../matcher/path-parser-ranker' +import { PathParserOptions } from '../matcher/pathParserRanker' import { markRaw, Ref, ComputedRef, ComponentOptions } from 'vue' import { RouteRecord, RouteRecordNormalized } from '../matcher/types' import { HistoryState } from '../history/common' @@ -274,7 +274,7 @@ export interface PostNavigationGuard { ): any } -export * from './type-guards' +export * from './typeGuards' export type Mutable = { -readonly [P in keyof T]: T[P] diff --git a/src/types/type-guards.ts b/src/types/typeGuards.ts similarity index 100% rename from src/types/type-guards.ts rename to src/types/typeGuards.ts -- 2.47.3