MCPcopy Create free account
hub / github.com/denoland/std / create

Function create

_tools/lint_plugin.ts:41–66  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

39 // https://docs.deno.com/runtime/contributing/style_guide/#prefer-%23-over-private-keyword
40 "prefer-private-field": {
41 create(context) {
42 return {
43 MethodDefinition(node) {
44 if (node.accessibility !== "private") return;
45 // TODO(iuioiua): add fix
46 context.report({
47 node,
48 range: node.range,
49 message: "Method uses `private` keyword",
50 hint:
51 "Use private field (`#`) instead of the `private` keyword. E.g. Use `#foo()` instead of `private foo()`.",
52 });
53 },
54 PropertyDefinition(node) {
55 if (node.accessibility !== "private") return;
56 // TODO(iuioiua): add fix
57 context.report({
58 node,
59 range: node.range,
60 message: "Property uses `private` keyword",
61 hint:
62 "Use private field (`#`) instead of the `private` keyword. E.g. Use `#foo` instead of `private foo`.",
63 });
64 },
65 };
66 },
67 },
68 // https://docs.deno.com/runtime/contributing/style_guide/#top-level-functions-should-not-use-arrow-syntax
69 "no-top-level-arrow-syntax": {

Callers

nothing calls this directly

Calls 5

resolveFunction · 0.90
includesMethod · 0.80
toFileUrlFunction · 0.50
findMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected