Standard eslint configuration for Software Ventures Limited
ISC License
Bot releases are visible (Hide)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] about 3 years ago
Published by github-actions[bot] about 3 years ago
Published by github-actions[bot] about 3 years ago
Published by github-actions[bot] about 3 years ago
var
in plain JavaScript (c1ebd98)const
if they are not reassigned (7f2f62d)arguments
in favour of rest params (44a7db7)function.apply()
where spread params could be used (2e106ff)function.apply()
in casesarguments
variable. Uselet
if itconst
instead.var
to declare variables is now considered an error in plain JS. Use let
const
instead.Math.pow
function is now disallowed in favour of the exponentiation**
.Published by github-actions[bot] about 3 years ago
any
type (5864f89)any
type in catch clause (249eb6f)this
keyword outside classes or class-like objects (e44f9c0)void
type outside generic or return types (7046a8b)__iterator__
extension (db2c93e)!
(2038b6c)\8
and \9
escape sequences in strings (b140eef)any
to a function that expects a specific type (1196da3)any
to a variable with a specific type (42d9e96)any
(71cba5b)any
from a function that declares a specific type (e7daa78)function.call()
and .apply()
(abf826b)RegExp
constructor (cd5d112)this
are typed as this
(5d16a78)u
flag (605cb8f)"use strict"
directive where it is not already implied (00c2199)"use strict"
directive in contexts where it is not"use strict"
is implied, explicit use of"use strict"
is disallowed.u
flag.RegExp
constructor with a string literal or regexp literal as itsError
to thereject
function of a Promise executor.function.call()
and .apply()
is now disallowed in cases where thefor
statement.\8
and \9
are no longer allowed in strings. Write8
or 9
instead.__iterator__
is now disallowed.this
keyword is no longer allowed outside classes or class-likereturn
, break
, or continue
statements are now considered an error=
paired with +
, -
or !
is now disallowed in+=
, -=
, or !=
.array.sort()
must now provide a compare function, unless the array is anthis
must be typed as returning this
.??
instead.any
from a function that declares a specific return type is no longerunknown
and narrow its type using type guards instead.any
types is no longer allowed. Cast the value to unknown
andany
to a variable with a specific type is no longer allowed. Cast theunknown
and then narrow its type using type guards instead.any
to a function that expects a specific type is no longer allowed.unknown
and then narrow its type using type guards instead.unknown
are no longer allowed. These arevar
, or variables declared with let
or var
from any parent scope where thevoid
is no longer allowed except as a function return type or asundefined
is more appropriate.any
type in a catch clause is no longer allowed. This is the defaultunknown
, so catchunknown
. The error can then be handled by narrowingany
type is no longer allowed. Use the actual type if possible, or useunknown
in combination with type guards if not.void
operator to make the intent clear. See!
is now disallowed. Use optional chaining ?.
ornotNull()
assertion from @softwareventures/nullable instead."property"
. Method signatures must be expressed as properties{{assertionStyle: "as", objectLiteralTypeAssertions: "never"}
.skipStrings: false
). If you need{}
is now disallowed by the ban-types rule.