List of rules
These lint rules are provided by the ende lint command. You can enable sets of rules in ende.json(c) by adding their tags (e.g. recommended, react) to the lint.rules.tags array.
If no tag is provided, then the recommended set of rules will be enabled by default.
To turn a rule off, add it to lint.rules.exclude in ende.json, or suppress a single diagnostic in your code with a deno-lint-ignore comment.
Filter by tag:
adjacent-overload-signatures(recommended)Requires overload signatures to be adjacent to each other.
ban-ts-comment(recommended)Disallows the use of Typescript directives without a comment.
ban-types(recommended)Bans the use of primitive wrapper objects (e.g.
Stringthe object is a wrapper ofstringthe primitive) in addition to the non-explicitFunctiontype and the misunderstoodObjecttype.ban-unknown-rule-code(recommended)Warns the usage of unknown rule codes in ignore directives.
ban-untagged-ignore(recommended)Requires
deno-lint-ignoreto be annotated with one or more rule names.ban-untagged-todoRequires TODOs to be annotated with either a user tag (
@user) or an issue reference (#issue).ban-unused-ignore(recommended)Warns unused ignore directives.
camelcaseEnforces the use of camelCase in variable names.
constructor-super(recommended)Verifies the correct usage of constructors and calls to
super().default-param-lastEnforces default parameter(s) to be last in the function signature.
eqeqeqEnforces the use of type-safe equality operators
===and!==instead of the more error prone==and!=operators.explicit-function-return-typeRequires all functions to have explicit return types.
explicit-module-boundary-typesRequires all module exports to have fully typed declarations.
for-direction(recommended)Requires
forloop control variables to increment in the correct direction.getter-return(recommended)Requires all property getter functions to return a value.
guard-for-inRequire
for-inloops to include anifstatement.jsx-boolean-value(recommended, react, jsx)Enforce a consistent JSX boolean value style. Passing
trueas the boolean value can be omitted with the shorthand syntax.jsx-button-has-type(recommended, react, jsx, fresh)Enforce
<button>elements to have atypeattribute. If a<button>is placed inside a<form>element it will act as a submit button by default which can be unexpected.jsx-curly-braces(recommended, react, jsx)Ensure consistent use of curly braces around JSX expressions.
jsx-key(recommended, react, jsx)Ensure the
keyattribute is present when passing iterables into JSX. It allows frameworks to optimize checking the order of elements.jsx-no-children-prop(recommended, react, jsx, fresh)Pass children as JSX children instead of as an attribute.
jsx-no-comment-text-nodes(recommended, react, jsx, fresh)JavaScript comments inside text nodes are rendered as plain text in JSX. This is often unexpected.
jsx-no-duplicate-props(recommended, react, jsx)Disallow duplicated JSX props. Later props will always overwrite earlier props often leading to unexpected results.
jsx-no-unescaped-entities(recommended, react, jsx, fresh)Leaving the
>or}character in JSX is often undesired and difficult to spot. Enforce that these characters must be passed as strings.jsx-no-useless-fragment(recommended, react, jsx, fresh)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.
jsx-props-no-spread-multi(recommended, react, jsx)Spreading the same expression twice is typically a mistake and causes unnecessary computations.
jsx-void-dom-elements-no-children(recommended, react, jsx, fresh)Ensure that void elements in HTML don't have any children as that is not valid HTML. See
Void elementarticle on MDN for more information.no-array-constructor(recommended)Enforce conventional usage of array construction.
no-async-promise-executor(recommended)Requires that async promise executor functions are not used.
no-await-in-loopRequires
awaitis not used in a for loop body.no-await-in-sync-fn(recommended)Disallow
awaitkeyword inside a non-async function.no-boolean-literal-for-argumentsRequires all functions called with any amount of
booleanliterals as parameters to use a self-documenting constant instead.no-case-declarations(recommended)Requires lexical declarations (
let,const,functionandclass) in switchcaseordefaultclauses to be scoped with brackets.no-class-assign(recommended)Disallows modifying variables of class declarations.
no-compare-neg-zero(recommended)Disallows comparing against negative zero (
-0).no-cond-assign(recommended)Disallows the use of the assignment operator,
=, in conditional statements.no-consoleDisallows the use of the
consoleglobal.no-const-assign(recommended)Disallows modifying a variable declared as
const.no-constant-condition(recommended)Disallows the use of a constant expression in conditional test.
no-control-regex(recommended)Disallows the use ASCII control characters in regular expressions.
no-debugger(recommended)Disallows the use of the
debuggerstatement.no-delete-var(recommended)Disallows the deletion of variables.
no-deprecated-deno-api(recommended)Warns the usage of the deprecated - Ende APIs.
no-dupe-args(recommended)Disallows using an argument name more than once in a function signature.
no-dupe-class-members(recommended)Disallows using a class member function name more than once.
no-dupe-else-if(recommended)Disallows using the same condition twice in an
if/else ifstatement.no-dupe-keys(recommended)Disallows duplicate keys in object literals.
no-duplicate-case(recommended)Disallows using the same case clause in a switch statement more than once.
no-empty(recommended)Disallows the use of empty block statements.
no-empty-character-class(recommended)Disallows using the empty character class in a regular expression.
no-empty-enum(recommended)Disallows the declaration of an empty enum.
no-empty-interface(recommended)Disallows the declaration of an empty interface.
no-empty-pattern(recommended)Disallows the use of empty patterns in destructuring.
no-evalDisallows the use of
eval.no-ex-assign(recommended)Disallows the reassignment of exception parameters.
no-explicit-any(recommended)Disallows use of the
anytype.no-external-importDisallows the use of external imports.
no-extra-boolean-cast(recommended)Disallows unnecessary boolean casts.
no-extra-non-null-assertion(recommended)Disallows unnecessary non-null assertions.
no-fallthrough(recommended)Disallows the implicit fallthrough of case statements.
no-func-assign(recommended)Disallows the overwriting/reassignment of an existing function.
no-global-assign(recommended)Disallows assignment to native Javascript objects.
no-implicit-declare-namespace-exportDisallows the use of implicit exports in ["ambient" namespaces].
no-import-assertions(recommended)Disallows the
assertkeyword for import attributes.no-import-assign(recommended)Disallows reassignment of imported module bindings.
no-import-prefix(workspace)Ensure that all dependencies are declared in either
ende.jsonorpackage.json.no-inferrable-typesDisallows easily inferrable types.
no-inner-declarations(recommended)Disallows variable or function definitions in nested blocks.
no-invalid-regexp(recommended)Disallows specifying invalid regular expressions in RegExp constructors.
no-invalid-triple-slash-reference(recommended)Warns the wrong usage of triple-slash reference directives.
no-irregular-whitespace(recommended)Disallows the use of non-space or non-tab whitespace characters.
no-misused-new(recommended)Disallows defining
constructors for interfaces ornewfor classesno-namespace(recommended)Disallows the use of
namespaceandmodulekeywords in TypeScript code.no-new-symbol(recommended)Disallows the use of
newoperators with built-inSymbols.no-node-globalsDisallows the use of NodeJS global objects.
no-non-null-asserted-optional-chainDisallow non-null assertions after an optional chain expression.
no-non-null-assertionDisallow non-null assertions using the
!postfix operator.no-obj-calls(recommended)Disallows calling built-in global objects like functions.
no-octal(recommended)Disallows expressing octal numbers via numeric literals beginning with
0.no-process-globalDisallows the use of NodeJS
processglobal.no-prototype-builtins(recommended)Disallows the use of
Object.prototypebuiltins directly.no-redeclare(recommended)Disallows redeclaration of variables, functions, parameters with the same name.
no-regex-spaces(recommended)Disallows multiple spaces in regular expression literals.
no-self-assign(recommended)Disallows self assignments.
no-self-compareDisallows comparisons where both sides are exactly the same.
no-setter-return(recommended)Disallows returning values from setters.
no-shadow-restricted-names(recommended)Disallows shadowing of restricted names.
no-sloppy-imports(recommended)Enforces specifying explicit references to paths in module specifiers.
no-slow-types(jsr)Enforces using types that are explicit or can be simply inferred.
no-sparse-arraysDisallows sparse arrays.
no-sync-fn-in-async-fnDisallow sync function inside async function.
no-this-alias(recommended)Disallows assigning variables to
this.no-this-before-super(recommended)Disallows use of
thisorsuperbefore callingsuper()in constructors.no-throw-literalDisallow throwing literals as exceptions.
no-top-level-awaitDisallows the use of top level await expressions.
no-undefDisallow the use of undeclared variables.
no-unreachable(recommended)Disallows the unreachable code after the control flow statements.
no-unsafe-finally(recommended)Disallows the use of control flow statements within
finallyblocks.no-unsafe-negation(recommended)Disallows the usage of negation operator
!as the left operand of relational operators.no-unused-labels(recommended)Disallows unused labels.
no-unused-vars(recommended)Enforces all variables are used at least once.
no-unversioned-import(recommended)Ensure that inline dependency imports have a version specifier.
no-useless-renameDisallow useless rename operations where both the original and new name are exactly the same. This is often a leftover from a refactoring procedure and can be safely removed.
no-var(recommended)Enforces the use of block scoped variables over more error prone function scoped variables. Block scoped variables are defined using
constandletkeywords.no-window(recommended)Disallows the use of the
windowobject.no-window-prefix(recommended)Disallows the use of Web APIs via the
windowobject.no-with(recommended)Disallows the usage of
withstatements.prefer-as-const(recommended)Recommends using const assertion (
as const) over explicitly specifying literal types or using type assertion.prefer-asciiEnsures that the code is fully written in ASCII characters.
prefer-const(recommended)Recommends declaring variables with [
const] over [let].prefer-namespace-keyword(recommended)Recommends the use of
namespacekeyword overmodulekeyword when declaring TypeScript module.prefer-primordialsSuggests using frozen intrinsics from
primordialsrather than the default globals.react-no-danger(react, fresh)Prevent the use of
dangerouslySetInnerHTMLwhich can lead to XSS vulnerabilities if used incorrectly.react-no-danger-with-children(react, fresh)Using JSX children together with
dangerouslySetInnerHTMLis invalid as they will be ignored.react-rules-of-hooks(react, fresh)Ensure that hooks are called correctly in React/Preact components. They must be called at the top level of a component and not inside a conditional statement or a loop.
require-await(recommended)Disallows async functions that have no await expression or await using declaration.
require-yield(recommended)Disallows generator functions that have no
yield.single-var-declaratorDisallows multiple variable definitions in the same declaration statement.
triple-slash-referenceDisallow certain triple slash directives in favor of ES6-style import declarations.
use-isnan(recommended)Disallows comparisons to
NaN.valid-typeof(recommended)Restricts the use of the
typeofoperator to a specific set of string literals.verbatim-module-syntax(jsr)Enforces type imports to be declared as type imports.