Skip to content

Commit

Permalink
add tags
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Dec 12, 2024
1 parent 5ee6816 commit 04dd704
Show file tree
Hide file tree
Showing 117 changed files with 468 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lint/rules/adjacent-overload-signatures.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Requires overload signatures to be adjacent to each other.

Overloaded signatures which are not next to each other can lead to code which is
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/ban-ts-comment.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows the use of Typescript directives without a comment.

Typescript directives reduce the effectiveness of the compiler, something which
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/ban-types.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Bans the use of primitive wrapper objects (e.g. `String` the object is a wrapper
of `string` the primitive) in addition to the non-explicit `Function` type and
the misunderstood `Object` type.
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/ban-unknown-rule-code.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Warns the usage of unknown rule codes in ignore directives

We sometimes have to suppress and ignore lint errors for some reasons. We can do
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/ban-untagged-ignore.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Requires `deno-lint-ignore` to be annotated with one or more rule names.

Ignoring all rules can mask unexpected or future problems. Therefore you need to
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/ban-untagged-todo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Requires TODOs to be annotated with either a user tag (`@user`) or an issue
reference (`#issue`).

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/ban-unused-ignore.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Warns unused ignore directives

We sometimes have to suppress and ignore lint errors for some reasons and we can
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/button-has-type.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Checks that a `<button>` JSX element has a valid `type` attribute. The default
value is `"submit"` which is often not the desired behavior.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/camelcase.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Enforces the use of camelCase in variable names

Consistency in a code base is key for readability and maintainability. This rule
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/constructor-super.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Verifies the correct usage of constructors and calls to `super()`.

Defined constructors of derived classes (e.g. `class A extends B`) must always
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/default-param-last.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Enforces default parameter(s) to be last in the function signature.

Parameters with default values are optional by nature but cannot be left out of
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/eqeqeq.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Enforces the use of type-safe equality operators `===` and `!==` instead of the
more error prone `==` and `!=` operators.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/explicit-function-return-type.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Requires all functions to have explicit return types.

Explicit return types have a number of advantages including easier to understand
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/explicit-module-boundary-types.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Requires all module exports to have fully typed declarations

Having fully typed function arguments and return values clearly defines the
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/for-direction.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Requires `for` loop control variables to increment in the correct direction

Incrementing `for` loop control variables in the wrong direction leads to
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/fresh-handler-export.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [fresh]
---

Checks correct naming for named fresh middleware export

Files inside the `routes/` folder can export middlewares that run before any
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/fresh-server-event-handlers.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [fresh]
---

Disallows event handlers in fresh server components

Components inside the `routes/` folder in a fresh app are exclusively rendered
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/getter-return.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Requires all property getter functions to return a value

Getter functions return the value of a property. If the function returns no
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/guard-for-in.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Require `for-in` loops to include an `if` statement

Looping over objects with a `for-in` loop will include properties that are
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-boolean-value.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Enforce a consistent JSX boolean value style. Passing `true` as the boolean
value can be omitted with the shorthand syntax.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-curly-braces.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Ensure consistent use of curly braces around JSX expressions.

**Invalid:**
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-key.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Ensure the `key` attribute is present when passing iterables into JSX. It allows
frameworks to optimize checking the order of elements.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-no-children-prop.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Pass children as JSX children instead of as an attribute.

**Invalid:**
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-no-danger-with-children.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Using JSX children together with `dangerouslySetInnerHTML` is invalid as they
will be ignored.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-no-duplicate-props.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Disallow duplicated JSX props. Later props will always overwrite earlier props
often leading to unexpected results.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-no-useless-fragment.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Fragments are only necessary at the top of a JSX "block" and only when there are
multiple children. Fragments are not needed in other scenarios.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-props-no-spread-multi.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Spreading the same expression twice is typically a mistake and causes
unnecessary computations.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/jsx-void-dom-elements-no-children.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Ensure that void elements in HTML don't have any children as that is not valid
HTML. See
[`Void element` article on MDN](https://developer.mozilla.org/en-US/docs/Glossary/Void_element)
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-array-constructor.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Enforce conventional usage of array construction

Array construction is conventionally done via literal notation such as `[]` or
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-async-promise-executor.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Requires that async promise executor functions are not used

Promise constructors take an executor function as an argument with `resolve` and
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-await-in-loop.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Requires `await` is not used in a for loop body

Async and await are used in Javascript to provide parallel execution. If each
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-await-in-sync-fn.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallow `await` keyword inside a non-async function

Using the `await` keyword inside a non-async function is a syntax error. To be
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-boolean-literal-for-arguments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Requires all functions called with any amount of `boolean` literals as
parameters to use a self-documenting constant instead.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-case-declarations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Requires lexical declarations (`let`, `const`, `function` and `class`) in switch
`case` or `default` clauses to be scoped with brackets.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-class-assign.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows modifying variables of class declarations

Declaring a class such as `class A {}`, creates a variable `A`. Like any
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-compare-neg-zero.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows comparing against negative zero (`-0`).

Comparing a value directly against negative may not work as expected as it will
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-cond-assign.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows the use of the assignment operator, `=`, in conditional statements.

Use of the assignment operator within a conditional statement is often the
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-console.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Disallows the use of the `console` global.

Oftentimes, developers accidentally commit `console.log`/`console.error`
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-const-assign.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Disallows modifying a variable declared as `const`.

Modifying a variable declared as `const` will result in a runtime error.
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-constant-condition.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows the use of a constant expression in conditional test

Using a constant expression in a conditional test is often either a mistake or a
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-control-regex.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows the use ascii control characters in regular expressions

Control characters are invisible characters in the ASCII range of 0-31. It is
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-danger.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: []
---

Prevent the use of `dangerouslySetInnerHTML` which can lead to XSS
vulnerabilities if used incorrectly.

Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-debugger.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows the use of the `debugger` statement

`debugger` is a statement which is meant for stopping the javascript execution
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-delete-var.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows the deletion of variables

`delete` is used to remove a property from an object. Variables declared via
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-deprecated-deno-api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Warns the usage of the deprecated - Deno APIs

The following APIs will be removed from the `Deno.*` namespace but have newer
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-dupe-args.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows using an argument name more than once in a function signature

If you supply multiple arguments of the same name to a function, the last
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-dupe-class-members.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows using a class member function name more than once

Declaring a function of the same name twice in a class will cause the previous
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-dupe-else-if.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows using the same condition twice in an `if`/`else if` statement

When you reuse a condition in an `if`/`else if` statement, the duplicate
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-dupe-keys.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows duplicate keys in object literals.

Setting the same key multiple times in an object literal will override other
Expand Down
4 changes: 4 additions & 0 deletions lint/rules/no-duplicate-case.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [recommended]
---

Disallows using the same case clause in a switch statement more than once

When you reuse a case test expression in a `switch` statement, the duplicate
Expand Down
Loading

0 comments on commit 04dd704

Please sign in to comment.