Skip to content

Commit d025baa

Browse files
committed
chore: update dependencies
1 parent f041a96 commit d025baa

36 files changed

+832
-885
lines changed

cli/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ interface RunCommandOptions {
9999
*
100100
* It parses command-line arguments and delegates to the appropriate command
101101
* actions.
102-
*
103-
* @returns {void} This function does not return a value but may exit the
104-
* process.
105102
*/
106103
export function run(): void {
107104
let cli = cac('eslint-rule-benchmark')

constants/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const DEFAULT_SEVERITY = 2 as const
3838

3939
/**
4040
* Default output format for benchmark results. Options include: 'console',
41-
* 'json', 'markdown', 'html'
41+
* 'json', 'markdown', 'html'.
4242
*/
4343
export const DEFAULT_REPORTER_FORMAT = 'console' as const
4444

core/benchmark/calculate-statistics.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import type { BenchmarkMetrics } from '../../types/benchmark-metrics'
44
* Calculates various statistical metrics from an array of numbers. Assumes
55
* input samples are in nanoseconds for time-based metrics.
66
*
7-
* @param {number[]} samples - The array of numbers (e.g., execution times in
8-
* ns). Should not be empty. If it might be, the caller should handle that
9-
* case.
10-
* @returns {BenchmarkMetrics} An object containing calculated metrics.
7+
* @param samples - The array of numbers (e.g., execution times in ns). Should
8+
* not be empty. If it might be, the caller should handle that case.
9+
* @returns An object containing calculated metrics.
1110
*/
1211
export function calculateStatistics(samples: number[]): BenchmarkMetrics {
1312
if (samples.length === 0) {

core/benchmark/create-bench.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ interface CreateBenchOptions {
2525
/**
2626
* Creates a Tinybench benchmark instance with the specified configuration.
2727
*
28-
* @param {CreateBenchOptions} options - Benchmark configuration options.
29-
* @returns {Bench} Configured Tinybench instance ready for use.
28+
* @param options - Benchmark configuration options.
29+
* @returns Configured Tinybench instance ready for use.
3030
*/
3131
export function createBench(options: CreateBenchOptions = {}): Bench {
3232
return new Bench({

core/benchmark/create-benchmark-config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ interface CreateBenchmarkConfigParameters {
3636
/**
3737
* Creates a benchmark configuration with default settings.
3838
*
39-
* @param {CreateBenchmarkConfigParameters} parameters - Parameters for the
40-
* benchmark configuration.
41-
* @returns {BenchmarkConfig} A configured benchmark configuration.
39+
* @param parameters - Parameters for the benchmark configuration.
40+
* @returns A configured benchmark configuration.
4241
*/
4342
export function createBenchmarkConfig(
4443
parameters: CreateBenchmarkConfigParameters,

core/benchmark/filter-outliers.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77
* // filteredSamples might be [10, 12, 15, 11, 13, 9, 14]
88
* // outliersRemovedCount would be 1
99
*
10-
* @param {number[]} samples - The array of numbers (e.g., execution times in
11-
* ns).
12-
* @param {number} [multiplier] - The multiplier for the IQR (Interquartile
13-
* Range).
14-
* @returns {{ filteredSamples: number[]; outliersRemovedCount: number }} An
15-
* object containing the filtered samples and the count of removed outliers.
10+
* @param samples - The array of numbers (e.g., execution times in ns).
11+
* @param [multiplier] - The multiplier for the IQR (Interquartile Range).
12+
* @returns An object containing the filtered samples and the count of removed
13+
* outliers.
1614
*/
1715
export function filterOutliers(
1816
samples: number[],

core/benchmark/run-benchmark.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface RunBenchmarkParameters {
3434
testCases: TestCase[]
3535
}
3636

37-
/** Language type for benchmarking */
37+
/** Language type for benchmarking. */
3838
type Language = (typeof LANGUAGES)[number]
3939

4040
/**
@@ -61,13 +61,11 @@ type Language = (typeof LANGUAGES)[number]
6161
* })
6262
* }
6363
*
64-
* @param {RunBenchmarkParameters} parameters - The parameters for running the
65-
* benchmark, including the overall benchmark configuration and an array of
66-
* test cases.
67-
* @returns {Promise<ProcessedBenchmarkTask[] | null>} A promise that resolves
68-
* to an array of ProcessedBenchmarkTask objects, each containing the name and
69-
* calculated metrics for a benchmarked code sample. Returns null if no tasks
70-
* were run.
64+
* @param parameters - The parameters for running the benchmark, including the
65+
* overall benchmark configuration and an array of test cases.
66+
* @returns A promise that resolves to an array of ProcessedBenchmarkTask
67+
* objects, each containing the name and calculated metrics for a benchmarked
68+
* code sample. Returns null if no tasks were run.
7169
*/
7270
export async function runBenchmark(
7371
parameters: RunBenchmarkParameters,

core/config/define-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ import type { UserBenchmarkConfig } from '../../types/user-benchmark-config'
6060
* ],
6161
* })
6262
*
63-
* @param {UserBenchmarkConfig} config - User configuration object.
64-
* @returns {UserBenchmarkConfig} The same configuration with proper typing.
63+
* @param config - User configuration object.
64+
* @returns The same configuration with proper typing.
6565
*/
6666
export function defineConfig(config: UserBenchmarkConfig): UserBenchmarkConfig {
6767
return config

core/config/jiti-loader.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ let jiti = createJiti(import.meta.url, {
1818
/**
1919
* Loader for JavaScript and TypeScript files using jiti.
2020
*
21-
* @param {string} filepath - Path to the file to load.
22-
* @param {string} _content - Content of the file (not used).
23-
* @returns {Promise<UserBenchmarkConfig>} Loaded and processed configuration.
21+
* @param filepath - Path to the file to load.
22+
* @param _content - Content of the file (not used).
23+
* @returns Loaded and processed configuration.
2424
*/
2525
export let jitiLoader: Loader = async (filepath: string, _content: string) => {
2626
try {

core/config/json-loader.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import type { UserBenchmarkConfig } from '../../types/user-benchmark-config'
55
/**
66
* Loader for JSON files.
77
*
8-
* @param {string} _filepath - Path to the file (not used directly but required
9-
* by Loader interface).
10-
* @param {string} content - Content of the JSON file.
11-
* @returns {UserBenchmarkConfig} Parsed JSON configuration object.
8+
* @param _filepath - Path to the file (not used directly but required by Loader
9+
* interface).
10+
* @param content - Content of the JSON file.
11+
* @returns Parsed JSON configuration object.
1212
*/
1313
export let jsonLoader: Loader = (_filepath, content): UserBenchmarkConfig => {
1414
try {

0 commit comments

Comments
 (0)