Skip to content

Commit 5b89fd6

Browse files
committed
Require double quotes
1 parent e7a81a7 commit 5b89fd6

16 files changed

Lines changed: 25 additions & 22 deletions

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
**/*.js
2+
**/*.cjs
23
config/*
34
tests/*
45
dist/*

.eslintrc.cjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ module.exports = {
1212
"parser": "@typescript-eslint/parser",
1313
"parserOptions": {
1414
"project": "tsconfig.json",
15-
"sourceType": "module"
15+
"sourceType": "module",
16+
"extraFileExtensions": [ ".cjs" ]
1617
},
1718
"plugins": [
1819
"eslint-plugin-jsdoc",
@@ -201,6 +202,7 @@ module.exports = {
201202
}
202203
],
203204
"use-isnan": "error",
204-
"valid-typeof": "error"
205+
"valid-typeof": "error",
206+
"quotes": ["error", "double"]
205207
}
206208
};

src/async/_private/aggregate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const aggregate: AggregateFunc = <TSource, TAccumulate, TResult>(
4646
resultSelector?: (x: TAccumulate) => TResult): Promise<TSource | TAccumulate | TResult | null> => {
4747
if (resultSelector) {
4848
if (!func) {
49-
throw new ReferenceError(`TAccumulate function is undefined`)
49+
throw new ReferenceError("TAccumulate function is undefined")
5050
}
5151

5252
return aggregate3(source, seedOrFunc as TAccumulate, func, resultSelector)

src/async/static/rangeAsync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { BasicAsyncEnumerable } from "../BasicAsyncEnumerable"
1212
*/
1313
export const rangeAsync = (start: number, count: number): IAsyncEnumerable<number> => {
1414
if (start < 0 || (start + count - 1) > Number.MAX_SAFE_INTEGER) {
15-
throw new ArgumentOutOfRangeException(`start`)
15+
throw new ArgumentOutOfRangeException("start")
1616
}
1717

1818
async function* iterator() {

src/async/static/repeatAsync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { BasicAsyncEnumerable } from "../BasicAsyncEnumerable"
1212
export const repeatAsync = <TResult>(
1313
element: TResult, count: number, delay?: number): IAsyncEnumerable<TResult> => {
1414
if (count < 0) {
15-
throw new ArgumentOutOfRangeException(`count`)
15+
throw new ArgumentOutOfRangeException("count")
1616
}
1717
if (delay) {
1818
return repeat2(element, count, delay)

src/initializer/bindArrayEnumerable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
import { ArgumentOutOfRangeException, ErrorString, InvalidOperationException } from "../shared"
33
import { ArrayEnumerable } from "../sync/ArrayEnumerable"
4-
import { BasicEnumerable } from '../sync/BasicEnumerable'
5-
import { IEnumerable } from '../types'
4+
import { BasicEnumerable } from "../sync/BasicEnumerable"
5+
import { IEnumerable } from "../types"
66

77
/**
88
* @private

src/initializer/bindString.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { IEnumerable } from '../types'
1+
import { IEnumerable } from "../types"
22
import { ArgumentOutOfRangeException, ErrorString, InvalidOperationException } from "../shared"
3-
import { BasicEnumerable } from '../sync/BasicEnumerable'
3+
import { BasicEnumerable } from "../sync/BasicEnumerable"
44

55
/**
66
* Adds LINQ methods to String prototype

src/parallel/_private/aggregate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const aggregate: AggregateFunc = <TSource, TAccumulate, TResult>(
4747
resultSelector?: (x: TAccumulate) => TResult): Promise<TSource | TAccumulate | TResult | null> => {
4848
if (resultSelector) {
4949
if (!func) {
50-
throw new ReferenceError(`TAccumulate function is undefined`)
50+
throw new ReferenceError("TAccumulate function is undefined")
5151
}
5252

5353
return aggregate3(source, seedOrFunc as TAccumulate, func, resultSelector)

src/parallel/static/rangeParallel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { BasicParallelEnumerable } from "../BasicParallelEnumerable"
1212
*/
1313
export const rangeParallel = (start: number, count: number): IParallelEnumerable<number> => {
1414
if (start < 0 || (start + count - 1) > Number.MAX_SAFE_INTEGER) {
15-
throw new ArgumentOutOfRangeException(`start`)
15+
throw new ArgumentOutOfRangeException("start")
1616
}
1717

1818
const generator = () => {

src/parallel/static/repeatParallel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const repeatParallel = <TResult>(
1313
// eslint-disable-next-line no-shadow
1414
element: TResult, count: number, delay?: number): IParallelEnumerable<TResult> => {
1515
if (count < 0) {
16-
throw new ArgumentOutOfRangeException(`count`)
16+
throw new ArgumentOutOfRangeException("count")
1717
}
1818
if (delay) {
1919
return repeat2(element, count, delay)

0 commit comments

Comments
 (0)