Closed TrevorKarjanis closed 1 year ago
default-case-last
seems like a perfectly reasonable rule. It enforces that the default case should come last. Recommend we enforce this rule.
function-call-argument-newline
with config set to consistent
seems reasonable. This enforces that function call args should either all be on one line or each be on separate lines. Recommend we enforce this rule.
We lean towards setting function-paren-newline
to multiline-arguments
. Trevor verified that the cases it catches all seem like the rule would make the code more readable.
grouped-accessor-pairs
seems reasonable. Nobody feels strongly about getBeforeSet
or setBeforeGet
so our initial recommendation is not to use either of those options.
import/no-import-module-exports
seems reasonable. It enforces that you use only CommonJS imports/exports or ES imports/exports, not a mixture within the same file. Recommend we enforce this rule.
import/no-relative-packages
seems reasonable. It enforces no relative path imports of packages (relative path imports of modules are still ok). We don't think anything would be violating it today but it would be good to double check.
no-promise-executor-return
seems reasonable. It enforces that the function you pass to new Promise()
should not return a value (it should call reject
/resolve
instead). Recommend we enforce this rule.
no-restricted-exports
should remain off
. Projects can configure it if they have specific export names they want to ban, but there aren't any that we want to ban globally.
no-unreachable-loop
seems reasonable. It detects when all code paths within a loop return early, making the loop unnecessary. Recommend we enforce this rule.
no-unsafe-optional-chaining
seems reasonable. It detects cases where the .?
operator might result in undefined
which isn't being handled. We should also enable disallowArithmeticOperators
to prevent NaN
from being accidentally unhandled.
no-useless-backreference
sounds reasonable. It prevents useless parts of regular expressions. Recommend we enable it.
no-constructor-return
seems reasonable. It prevents you from returning a value from a constructor. Recommend we enable it.
no-nonoctal-decimal-escape
seems reasonable. Recommend we enable it.
prefer-exponentiation-operator
seems reasonable. In the rare cases where we do exponentiation, prefer a consistent **
syntax rather than Math.pow()
. Recommend we enable it.
prefer-regex-literals
seems reasonable. We prefer literals over the RexExp()
constructor. Recommend we enable it.
There were rules that were disabled or reconfigured to avoid breaking changes after upgrading to ESLint 8 in #104 . They need to be evaluated for the correct configurations.