| 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": { |