Skip to content

Commit f8f4f8a

Browse files
Copilotadamziel
andcommitted
Remove custom eslint rule, keep only @typescript-eslint/parameter-properties
Per feedback, removed the custom no-unsupported-typescript-syntax rule and restored typedoc-model.ts to use the original enum. The @typescript-eslint/parameter-properties rule is sufficient for preventing the Node.js type stripping errors. Co-authored-by: adamziel <205419+adamziel@users.noreply.github.com>
1 parent 5de6f73 commit f8f4f8a

File tree

4 files changed

+28
-190
lines changed

4 files changed

+28
-190
lines changed

.eslintrc.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,8 @@
7979
"playground-dev/avoid-wordpress-builds-dependency": "error",
8080
// Node.js type stripping requires explicit type imports.
8181
"@typescript-eslint/consistent-type-imports": "error",
82-
// Disallow TypeScript syntax unsupported by Node.js type stripping.
83-
// Parameter properties are handled by @typescript-eslint/parameter-properties.
84-
"@typescript-eslint/parameter-properties": "error",
85-
// Enums and namespaces with value statements are handled by our custom rule.
86-
"playground-dev/no-unsupported-typescript-syntax": "error"
82+
// Disallow TypeScript parameter properties unsupported by Node.js type stripping.
83+
"@typescript-eslint/parameter-properties": "error"
8784
}
8885
},
8986
{

packages/docs/site/src/typedoc-model.ts

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,33 @@ import type {
99
// Avoid importing values from 'typedoc' as that
1010
// pulls in the entire library including cumbersome
1111
// node.js imports.
12-
export const ReflectionKind = {
13-
Project: 1,
14-
Module: 2,
15-
Namespace: 4,
16-
Enum: 8,
17-
EnumMember: 16,
18-
Variable: 32,
19-
Function: 64,
20-
Class: 128,
21-
Interface: 256,
22-
Constructor: 512,
23-
Property: 1024,
24-
Method: 2048,
25-
CallSignature: 4096,
26-
IndexSignature: 8192,
27-
ConstructorSignature: 16384,
28-
Parameter: 32768,
29-
TypeLiteral: 65536,
30-
TypeParameter: 131072,
31-
Accessor: 262144,
32-
GetSignature: 524288,
33-
SetSignature: 1048576,
12+
export enum ReflectionKind {
13+
Project = 1,
14+
Module = 2,
15+
Namespace = 4,
16+
Enum = 8,
17+
EnumMember = 16,
18+
Variable = 32,
19+
Function = 64,
20+
Class = 128,
21+
Interface = 256,
22+
Constructor = 512,
23+
Property = 1024,
24+
Method = 2048,
25+
CallSignature = 4096,
26+
IndexSignature = 8192,
27+
ConstructorSignature = 16384,
28+
Parameter = 32768,
29+
TypeLiteral = 65536,
30+
TypeParameter = 131072,
31+
Accessor = 262144,
32+
GetSignature = 524288,
33+
SetSignature = 1048576,
3434
/** @deprecated will be removed in v0.25, not used */
35-
ObjectLiteral: 2097152,
36-
TypeAlias: 4194304,
37-
Reference: 8388608,
38-
} as const;
39-
40-
export type ReflectionKind = (typeof ReflectionKind)[keyof typeof ReflectionKind];
35+
ObjectLiteral = 2097152,
36+
TypeAlias = 4194304,
37+
Reference = 8388608,
38+
}
4139

4240
const typed = api as any as ProjectReflection;
4341

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
const wpBuildsDepRule = require('./avoid-wordpress-builds-dependency');
2-
const noUnsupportedTypescriptSyntaxRule = require('./no-unsupported-typescript-syntax');
32
const plugin = {
43
rules: {
54
'avoid-wordpress-builds-dependency': wpBuildsDepRule,
6-
'no-unsupported-typescript-syntax': noUnsupportedTypescriptSyntaxRule,
75
},
86
};
97
module.exports = plugin;

packages/meta/src/eslint-plugin-playground-dev/no-unsupported-typescript-syntax.js

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)