Skip to content

Commit

Permalink
Fix lint errors from unicorn/filename-case
Browse files Browse the repository at this point in the history
  • Loading branch information
codykaup committed Sep 27, 2024
1 parent 7c95452 commit 414bd73
Show file tree
Hide file tree
Showing 43 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion bin-src/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const commands = {
init: () => require('./init').main(process.argv.slice(3)),
main: () => require('./main').main(process.argv.slice(2)),
trace: () => require('./trace').main(process.argv.slice(3)),
'trim-stats-file': () => require('./trim-stats-file').main(process.argv.slice(3)),
'trim-stats-file': () => require('./trimStatsFile').main(process.argv.slice(3)),
};

(commands[process.argv[2]] || commands.main)();
2 changes: 1 addition & 1 deletion bin-src/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import meow from 'meow';

import { getDependentStoryFiles } from '../node-src/lib/getDependentStoryFiles';
import { isPackageManifestFile } from '../node-src/lib/utils';
import { readStatsFile } from '../node-src/tasks/read-stats-file';
import { readStatsFile } from '../node-src/tasks/readStatsFile';
import { Context } from '../node-src/types';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import mockfs from 'mock-fs';
import { afterEach, describe, expect, it } from 'vitest';

import { readStatsFile } from '../node-src/tasks/read-stats-file';
import { readStatsFile } from '../node-src/tasks/readStatsFile';
import * as trimmedFile from './__mocks__/previewStatsJson/preview-stats.trimmed.json';

mockfs({
Expand Down
2 changes: 1 addition & 1 deletion bin-src/trim-stats-file.ts → bin-src/trimStatsFile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { outputFile } from 'fs-extra';

import { readStatsFile } from '../node-src/tasks/read-stats-file';
import { readStatsFile } from '../node-src/tasks/readStatsFile';

const dedupe = <T>(arr: T[]) => [...new Set(arr)];
const isUserCode = ({ name, moduleName = name }: { name?: string; moduleName?: string }) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"lint:package": "sort-package-json",
"release": "node scripts/release.js",
"trace": "node -r esm bin-src/trace.js",
"trim-stats": "node -r esm bin-src/trim-stats-file.js",
"trim-stats": "node -r esm bin-src/trimStatsFile.js",
"storybook": "start-storybook -p 9009 -s static",
"test": "jest",
"prepare": "husky install && npm run build",
Expand Down
2 changes: 1 addition & 1 deletion node-src/__mocks__/dependencyChanges/berry-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"lint:package": "sort-package-json",
"release": "node scripts/release.js",
"trace": "node -r esm bin-src/trace.js",
"trim-stats": "node -r esm bin-src/trim-stats-file.js",
"trim-stats": "node -r esm bin-src/trimStatsFile.js",
"storybook": "start-storybook -p 9009 -s static",
"test": "jest",
"prepare": "husky install && npm run build",
Expand Down
14 changes: 7 additions & 7 deletions node-src/git/getParentCommits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { beforeAll, describe, expect, it, vi } from 'vitest';
import generateGitRepository from './generateGitRepository';
import { getParentCommits } from './getParentCommits';
import { getCommit } from './git';
import doubleLoopDescription from './mocks/double-loop';
import longLineDescription from './mocks/long-line';
import longLoopDescription from './mocks/long-loop';
import createMockIndex from './mocks/mock-index';
import simpleLoopDescription from './mocks/simple-loop';
import threeParentsDescription from './mocks/three-parents';
import twoRootsDescription from './mocks/two-roots';
import doubleLoopDescription from './mocks/doubleLoop';
import longLineDescription from './mocks/longLine';
import longLoopDescription from './mocks/longLoop';
import createMockIndex from './mocks/mockIndex';
import simpleLoopDescription from './mocks/simpleLoop';
import threeParentsDescription from './mocks/threeParents';
import twoRootsDescription from './mocks/twoRoots';

const descriptions = {
simpleLoop: simpleLoopDescription,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions node-src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';

import { getGitInfo, runAll } from '.';
import * as git from './git/git';
import { DNSResolveAgent } from './io/getDNSResolveAgent';
import { DNSResolveAgent } from './io/getDnsResolveAgent';
import * as checkPackageJson from './lib/checkPackageJson';
import getEnv from './lib/getEnv';
import parseArgs from './lib/parseArgs';
Expand Down Expand Up @@ -275,7 +275,7 @@ const mockStats = {
};
const mockStatsFile = Readable.from([JSON.stringify(mockStats)]);

vi.mock('./tasks/read-stats-file', () => ({
vi.mock('./tasks/readStatsFile', () => ({
readStatsFile: () => Promise.resolve(mockStats),
}));

Expand Down
8 changes: 4 additions & 4 deletions node-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
getUncommittedHash,
getUserEmail,
} from './git/git';
import GraphQLClient from './io/GraphQLClient';
import HTTPClient from './io/HTTPClient';
import GraphQLClient from './io/graphqlClient';
import HTTPClient from './io/httpClient';
import checkForUpdates from './lib/checkForUpdates';
import checkPackageJson from './lib/checkPackageJson';
import { isE2EBuild } from './lib/e2e';
Expand All @@ -22,8 +22,8 @@ import { getConfiguration } from './lib/getConfiguration';
import getEnv from './lib/getEnv';
import getOptions from './lib/getOptions';
import { createLogger } from './lib/log';
import LoggingRenderer from './lib/LoggingRenderer';
import NonTTYRenderer from './lib/NonTTYRenderer';
import LoggingRenderer from './lib/loggingRenderer';
import NonTTYRenderer from './lib/nonTtyRenderer';
import parseArgs from './lib/parseArgs';
import { exitCodes, setExitCode } from './lib/setExitCode';
import { uploadMetadataFiles } from './lib/uploadMetadataFiles';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import retry from 'async-retry';

import { InitialContext } from '..';
import HTTPClient, { HTTPClientOptions } from './HTTPClient';
import HTTPClient, { HTTPClientOptions } from './httpClient';

const RETRYABLE_ERROR_CODE = 'RETRYABLE_ERROR_CODE';

Expand Down
2 changes: 1 addition & 1 deletion node-src/io/HTTPClient.ts → node-src/io/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HttpsProxyAgentOptions } from 'https-proxy-agent';
import fetch, { RequestInit, Response } from 'node-fetch';

import { Context } from '../types';
import getDNSResolveAgent from './getDNSResolveAgent';
import getDNSResolveAgent from './getDnsResolveAgent';
import getProxyAgent from './getProxyAgent';

export class HTTPClientError extends Error {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion node-src/lib/getDependentStoryFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'path';

import { getRepositoryRoot } from '../git/git';
import { Context, Module, Reason, Stats } from '../types';
import noCSFGlobs from '../ui/messages/errors/noCSFGlobs';
import noCSFGlobs from '../ui/messages/errors/noCsfGlobs';
import tracedAffectedFiles from '../ui/messages/info/tracedAffectedFiles';
import bailFile from '../ui/messages/warnings/bailFile';
import { isPackageManifestFile, matchesFile } from './utils';
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion node-src/lib/uploadFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FormData } from 'formdata-node';
import pLimit from 'p-limit';

import { Context, FileDesc, TargetInfo } from '../types';
import { FileReaderBlob } from './FileReaderBlob';
import { FileReaderBlob } from './fileReaderBlob';

export async function uploadFiles(
ctx: Context,
Expand Down
2 changes: 1 addition & 1 deletion node-src/lib/uploadMetadataFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { stat, writeFileSync } from 'fs';
import path from 'path';
import { withFile } from 'tmp-promise';

import { main as trimStatsFile } from '../../bin-src/trim-stats-file';
import { main as trimStatsFile } from '../../bin-src/trimStatsFile';
import { Context, FileDesc } from '../types';
import metadataHtml from '../ui/html/metadata.html';
import uploadingMetadata from '../ui/messages/info/uploadingMetadata';
Expand Down
2 changes: 1 addition & 1 deletion node-src/lib/uploadZip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { filesize } from 'filesize';
import { FormData } from 'formdata-node';

import { Context, TargetInfo } from '../types';
import { FileReaderBlob } from './FileReaderBlob';
import { FileReaderBlob } from './fileReaderBlob';

export async function uploadZip(
ctx: Context,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion node-src/tasks/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Context, Task } from '../types';
import buildHasChanges from '../ui/messages/errors/buildHasChanges';
import buildHasErrors from '../ui/messages/errors/buildHasErrors';
import buildPassedMessage from '../ui/messages/info/buildPassed';
import speedUpCI from '../ui/messages/info/speedUpCI';
import speedUpCI from '../ui/messages/info/speedUpCi';
import {
buildBroken,
buildCanceled,
Expand Down
4 changes: 2 additions & 2 deletions node-src/tasks/upload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ vi.mock('../lib/compress');
vi.mock('../lib/getDependentStoryFiles');
vi.mock('../lib/findChangedDependencies');
vi.mock('../lib/findChangedPackageFiles');
vi.mock('./read-stats-file', () => ({
vi.mock('./readStatsFile', () => ({
readStatsFile: () =>
Promise.resolve({
modules: [
Expand All @@ -34,7 +34,7 @@ vi.mock('./read-stats-file', () => ({
}),
}));

vi.mock('../lib/FileReaderBlob', () => ({
vi.mock('../lib/fileReaderBlob', () => ({
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
FileReaderBlob: class {
constructor(_path: string, length: number, onProgress: (delta: number) => void) {
Expand Down
2 changes: 1 addition & 1 deletion node-src/tasks/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
uploading,
validating,
} from '../ui/tasks/upload';
import { readStatsFile } from './read-stats-file';
import { readStatsFile } from './readStatsFile';

interface PathSpec {
pathname: string;
Expand Down
4 changes: 2 additions & 2 deletions node-src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InitialContext } from '.';
import GraphQLClient from './io/GraphQLClient';
import HTTPClient from './io/HTTPClient';
import GraphQLClient from './io/graphqlClient';
import HTTPClient from './io/httpClient';
import type { Configuration } from './lib/getConfiguration';
import { Env } from './lib/getEnv';
import { Logger } from './lib/log';
Expand Down
2 changes: 1 addition & 1 deletion node-src/ui/messages/errors/graphqlError.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GraphQLError } from '../../../io/GraphQLClient';
import { GraphQLError } from '../../../io/graphqlClient';
import graphqlError from './graphqlError';

export default {
Expand Down
2 changes: 1 addition & 1 deletion node-src/ui/messages/errors/graphqlError.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from 'chalk';
import { dedent } from 'ts-dedent';

import { GraphQLError } from '../../../io/GraphQLClient';
import { GraphQLError } from '../../../io/graphqlClient';
import { error as icon } from '../../components/icons';
import link from '../../components/link';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import noCSFGlobs from './noCSFGlobs';
import noCSFGlobs from './noCsfGlobs';

export default {
title: 'CLI/Messages/Errors',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import speedUpCI from './speedUpCI';
import speedUpCI from './speedUpCi';

export default {
title: 'CLI/Messages/Info',
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion subdir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"start": "start-storybook",
"build": "build-storybook --webpack-stats-json --output-dir ../subdir-static",
"postbuild": "node -r esm ../bin-src/trim-stats-file.js ../subdir-static/preview-stats.json"
"postbuild": "node -r esm ../bin-src/trimStatsFile.js ../subdir-static/preview-stats.json"
},
"dependencies": {
"@storybook/react": "^6.3.7",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import React from 'react';

import isChromatic from '..';
import AComponent from './A';
import isChromatic from '../isChromatic';
import AComponent from './a';

export default {
title: 'Tests',
Expand Down

0 comments on commit 414bd73

Please sign in to comment.