JavaScript

JavaScript

By DeepSource

Forbid certain props on Components JS-0394
Performance

By default this rule prevents passing of props that add lots of complexity (className, style) to Components. This rule only applies to Components (e.g. <Foo />) and not DOM nodes (e.g. <div />). The list of forbidden props can be customized with the forbid option.

Prefer that no distracting elements are used JS-0758
Performance

Enforces that no distracting elements are used. Elements that can be visually distracting can cause accessibility issues with visually impaired users. Such elements are most likely deprecated, and should be avoided. By default, the following elements are visually distracting: <marquee> and <blink>.

Unnecessary return await function found JS-0111
Performance

Using return await inside an async function keeps the current function in the call stack until the Promise that is being awaited has resolved, at the cost of an extra microtask before resolving the outer Promise. return await can also be used in a try/catch statement to catch errors from another function that returns a Promise. You can avoid the extra microtask by not awaiting the return value, with the trade off of the function no longer being a part of the stack trace if an error is thrown asynchronously from the Promise being returned. This can make debugging more difficult.

Module imported is not necessary JS-0234
Performance

Imports are an ES6/ES2015 standard for making the functionality of other modules available in your current module. In CommonJS this is implemented through the require() call. Why would you want to restrict imports?

Require symbol description JS-0250
Performance

The Symbol function may have an optional description: