Skip to content

Commit d509ad0

Browse files
committed
tools: lintjs rebase
1 parent 23960d7 commit d509ad0

File tree

14 files changed

+765
-250
lines changed

14 files changed

+765
-250
lines changed

doc/api/typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ This example will work correctly:
141141
```ts
142142
// This namespace is exporting a type
143143
namespace TypeOnly {
144-
export type A = string;
144+
export type A = string;
145145
}
146146
```
147147

@@ -150,7 +150,7 @@ This will result in [`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`][] error:
150150
```ts
151151
// This namespace is exporting a value
152152
namespace A {
153-
export const x = 1;
153+
export const x = 1;
154154
}
155155
```
156156

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const babelPluginSyntaxImportSource = resolveEslintTool('@babel/plugin-syntax-im
2525
const { default: jsdoc } = await importEslintTool('eslint-plugin-jsdoc');
2626
const { default: markdown } = await importEslintTool('eslint-plugin-markdown');
2727
const { default: stylisticJs } = await importEslintTool('@stylistic/eslint-plugin');
28-
const { default: stylisticJs } = await importEslintTool('@stylistic/eslint-plugin-js');
2928
const { default: tseslint } = await importEslintTool('typescript-eslint');
3029

3130
nodeCore.RULES_DIR = fileURLToPath(new URL('./tools/eslint-rules', import.meta.url));

tools/eslint/package-lock.json

Lines changed: 640 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"eslint-formatter-tap": "^8.40.0",
1414
"eslint-plugin-jsdoc": "^51.3.1",
1515
"eslint-plugin-markdown": "^5.1.0",
16-
"globals": "^16.3.0"
16+
"globals": "^16.3.0",
1717
"typescript-eslint": "^8.32.0"
1818
}
1919
}

typings/globals.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ interface InternalBindingMap {
5252

5353
type InternalBindingKeys = keyof InternalBindingMap;
5454

55-
declare function internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]
55+
declare function internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T];
5656

5757
declare global {
5858
type TypedArray =

typings/internalBinding/blob.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ declare namespace InternalBlobBinding {
55
}
66

77
export interface BlobBinding {
8-
createBlob(sources: Array<Uint8Array | InternalBlobBinding.BlobHandle>, length: number): InternalBlobBinding.BlobHandle;
9-
getDataObject(id: string): [handle: InternalBlobBinding.BlobHandle | undefined, length: number, type: string] | undefined;
8+
createBlob(sources: Array<Uint8Array | InternalBlobBinding.BlobHandle>, length: number):
9+
InternalBlobBinding.BlobHandle;
10+
getDataObject(id: string):
11+
[handle: InternalBlobBinding.BlobHandle | undefined, length: number, type: string] | undefined;
1012
storeDataObject(id: string, handle: InternalBlobBinding.BlobHandle, size: number, type: string): void;
1113
}

typings/internalBinding/fs.d.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface ReadFileContext {
1010
pos: number;
1111
encoding: string;
1212
err: Error | null;
13-
signal: unknown /* AbortSignal | undefined */;
13+
signal: unknown; /* AbortSignal | undefined */
1414
}
1515

1616
declare namespace InternalFSBinding {
@@ -80,8 +80,16 @@ declare namespace InternalFSBinding {
8080
usePromises: typeof kUsePromises): Promise<void>;
8181

8282
function cpSyncCheckPaths(src: StringOrBuffer, dest: StringOrBuffer, dereference: boolean, recursive: boolean): void;
83-
function cpSyncOverrideFile(src: StringOrBuffer, dest: StringOrBuffer, mode: number, preserveTimestamps: boolean): void;
84-
function cpSyncCopyDir(src: StringOrBuffer, dest: StringOrBuffer, force: boolean, errorOnExist: boolean, verbatimSymlinks: boolean, dereference: boolean): void;
83+
function cpSyncOverrideFile(src: StringOrBuffer,
84+
dest: StringOrBuffer,
85+
mode: number,
86+
preserveTimestamps: boolean): void;
87+
function cpSyncCopyDir(src: StringOrBuffer,
88+
dest: StringOrBuffer,
89+
force: boolean,
90+
errorOnExist: boolean,
91+
verbatimSymlinks: boolean,
92+
dereference: boolean): void;
8593

8694
function fchmod(fd: number, mode: number, req: FSReqCallback): void;
8795
function fchmod(fd: number, mode: number): void;

typings/internalBinding/inspector.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface InspectorBinding {
1313
nodeMethod: (...args: any[]) => any,
1414
...args: any[]
1515
): void;
16-
setConsoleExtensionInstaller(installer: Function): void;
16+
setConsoleExtensionInstaller(installer: (...args: any[]) => any): void;
1717
callAndPauseOnStart(
1818
fn: (...args: any[]) => any,
1919
thisArg: any,

typings/internalBinding/messaging.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export interface MessagingBinding {
2525
stopMessagePort(port: typeof InternalMessagingBinding.MessagePort): void;
2626
drainMessagePort(port: typeof InternalMessagingBinding.MessagePort): void;
2727
receiveMessageOnPort(port: typeof InternalMessagingBinding.MessagePort): any;
28-
moveMessagePortToContext(port: typeof InternalMessagingBinding.MessagePort,
29-
context: any): typeof InternalMessagingBinding.MessagePort;
28+
moveMessagePortToContext(port: typeof InternalMessagingBinding.MessagePort, context: any):
29+
typeof InternalMessagingBinding.MessagePort;
3030
setDeserializerCreateObjectFunction(func: (deserializeInfo: string) => any): void;
3131
broadcastChannel(name: string): typeof InternalMessagingBinding.MessagePort;
3232
}

typings/internalBinding/modules.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
export type PackageType = 'commonjs' | 'module' | 'none'
1+
export type PackageType = 'commonjs' | 'module' | 'none';
22
export type PackageConfig = {
33
name?: string
44
main?: any
55
type: PackageType
66
exports?: string | string[] | Record<string, unknown>
77
imports?: string | string[] | Record<string, unknown>
8-
}
8+
};
99
export type DeserializedPackageConfig = {
1010
data: PackageConfig,
1111
exists: boolean,
1212
path: string,
13-
}
13+
};
1414
export type SerializedPackageConfig = [
1515
PackageConfig['name'],
1616
PackageConfig['main'],
1717
PackageConfig['type'],
1818
string | undefined, // exports
1919
string | undefined, // imports
2020
DeserializedPackageConfig['path'], // pjson file path
21-
]
21+
];
2222

2323
export interface ModulesBinding {
2424
readPackageJSON(path: string): SerializedPackageConfig | undefined;

0 commit comments

Comments
 (0)