Skip to content

[Tracking]: eslint-plugin-unicorn rulesΒ #1309

Description

@fansenze

This is a tracking issue for porting the existing rules from eslint-plugin-unicorn.

There are 333 rules (+ 8 deprecated).

Category βœ… Done 🚫 Won't Total
Recommended 26 0 306
Not recommended 0 0 27
Deprecated 0 8 8
Total 26 8 341

βœ… = Implemented Β |Β  🚫 = Not intending to implement


Recommended rules

βœ… 26 Β |Β  🚫 0 Β /Β  Total: 306
Status Name
unicorn/better-dom-traversing
βœ… unicorn/catch-error-name
unicorn/class-reference-in-static-methods
unicorn/consistent-assert
unicorn/consistent-boolean-name
unicorn/consistent-class-member-order
unicorn/consistent-compound-words
unicorn/consistent-conditional-object-spread
unicorn/consistent-date-clone
unicorn/consistent-empty-array-spread
unicorn/consistent-existence-index-check
unicorn/consistent-export-decorator-position
unicorn/consistent-function-scoping
unicorn/consistent-json-file-read
unicorn/consistent-optional-chaining
unicorn/consistent-template-literal-escape
unicorn/consistent-tuple-labels
unicorn/default-export-style
unicorn/dom-node-dataset
unicorn/empty-brace-spaces
βœ… unicorn/error-message
unicorn/escape-case
unicorn/expiring-todo-comments
unicorn/explicit-length-check
unicorn/explicit-timer-delay
βœ… unicorn/filename-case
unicorn/import-style
unicorn/isolated-functions
unicorn/logical-assignment-operators
unicorn/max-nested-calls
unicorn/name-replacements
βœ… unicorn/new-for-builtins
unicorn/no-abusive-eslint-disable
unicorn/no-accessor-recursion
unicorn/no-accidental-bitwise-operator
unicorn/no-anonymous-default-export
unicorn/no-array-callback-reference
PR #1792 unicorn/no-array-concat-in-loop
βœ… unicorn/no-array-fill-with-reference-type
unicorn/no-array-from-fill
unicorn/no-array-method-this-argument
unicorn/no-array-reduce
unicorn/no-array-reverse
unicorn/no-array-sort
unicorn/no-array-sort-for-min-max
unicorn/no-array-splice
unicorn/no-async-promise-finally
unicorn/no-await-expression-member
βœ… unicorn/no-await-in-promise-methods
unicorn/no-blob-to-file
unicorn/no-boolean-sort-comparator
unicorn/no-break-in-nested-loop
unicorn/no-canvas-to-image
unicorn/no-chained-comparison
unicorn/no-collection-bracket-access
unicorn/no-computed-property-existence-check
unicorn/no-confusing-array-splice
unicorn/no-confusing-array-with
unicorn/no-console-spaces
unicorn/no-constant-zero-expression
unicorn/no-declarations-before-early-exit
unicorn/no-document-cookie
unicorn/no-double-comparison
unicorn/no-duplicate-if-branches
unicorn/no-duplicate-logical-operands
unicorn/no-duplicate-loops
unicorn/no-duplicate-set-values
unicorn/no-empty-file
unicorn/no-error-property-assignment
βœ… unicorn/no-exports-in-scripts
unicorn/no-for-each
unicorn/no-for-loop
unicorn/no-global-object-property-assignment
unicorn/no-immediate-mutation
unicorn/no-impossible-length-comparison
unicorn/no-incorrect-query-selector
unicorn/no-incorrect-template-string-interpolation
βœ… unicorn/no-instanceof-builtins
unicorn/no-invalid-argument-count
unicorn/no-invalid-character-comparison
βœ… unicorn/no-invalid-fetch-options
βœ… unicorn/no-invalid-remove-event-listener
unicorn/no-invalid-well-known-symbol-methods
unicorn/no-late-current-target-access
unicorn/no-late-event-control
unicorn/no-lonely-if
unicorn/no-loop-iterable-mutation
PR #1915 unicorn/no-magic-array-flat-depth
unicorn/no-mismatched-map-key
unicorn/no-misrefactored-assignment
unicorn/no-multiple-promise-resolver-calls
unicorn/no-named-default
unicorn/no-negated-array-predicate
unicorn/no-negated-comparison
unicorn/no-negated-condition
unicorn/no-negation-in-equality-check
βœ… unicorn/no-nested-ternary
unicorn/no-new-array
unicorn/no-new-buffer
unicorn/no-non-function-verb-prefix
unicorn/no-nonstandard-builtin-properties
unicorn/no-null
unicorn/no-object-as-default-parameter
unicorn/no-object-methods-with-collections
unicorn/no-optional-chaining-on-undeclared-variable
unicorn/no-process-exit
unicorn/no-redundant-comparison
unicorn/no-return-array-push
unicorn/no-selector-as-dom-name
unicorn/no-shorthand-property-overrides
unicorn/no-single-promise-in-promise-methods
βœ… unicorn/no-static-only-class
unicorn/no-subtraction-comparison
βœ… unicorn/no-thenable
βœ… unicorn/no-this-assignment
unicorn/no-this-outside-of-class
unicorn/no-top-level-assignment-in-function
unicorn/no-top-level-side-effects
unicorn/no-transition-all
unicorn/no-typeof-undefined
unicorn/no-uncalled-method
unicorn/no-undeclared-class-members
unicorn/no-unnecessary-array-flat-depth
unicorn/no-unnecessary-array-flat-map
unicorn/no-unnecessary-array-splice-count
unicorn/no-unnecessary-await
unicorn/no-unnecessary-boolean-comparison
unicorn/no-unnecessary-fetch-options
unicorn/no-unnecessary-global-this
unicorn/no-unnecessary-nested-ternary
unicorn/no-unnecessary-polyfills
unicorn/no-unnecessary-slice-end
unicorn/no-unnecessary-splice
unicorn/no-unnecessary-string-trim
unicorn/no-unreadable-array-destructuring
unicorn/no-unreadable-for-of-expression
unicorn/no-unreadable-iife
unicorn/no-unreadable-object-destructuring
unicorn/no-unsafe-buffer-conversion
unicorn/no-unsafe-promise-all-settled-values
unicorn/no-unsafe-property-key
βœ… unicorn/no-unsafe-string-replacement
unicorn/no-unused-array-method-return
unicorn/no-useless-boolean-cast
unicorn/no-useless-coercion
unicorn/no-useless-collection-argument
unicorn/no-useless-compound-assignment
unicorn/no-useless-concat
unicorn/no-useless-continue
unicorn/no-useless-delete-check
unicorn/no-useless-else
unicorn/no-useless-error-capture-stack-trace
unicorn/no-useless-fallback-in-spread
unicorn/no-useless-iterator-to-array
unicorn/no-useless-length-check
unicorn/no-useless-logical-operand
unicorn/no-useless-override
unicorn/no-useless-promise-resolve-reject
unicorn/no-useless-re-export
unicorn/no-useless-recursion
unicorn/no-useless-spread
βœ… unicorn/no-useless-switch-case
unicorn/no-useless-template-literals
unicorn/no-useless-undefined
βœ… unicorn/no-xor-as-exponentiation
unicorn/no-zero-fractions
unicorn/number-literal-case
unicorn/numeric-separators-style
unicorn/operator-assignment
unicorn/prefer-abort-signal-any
unicorn/prefer-abort-signal-timeout
unicorn/prefer-add-event-listener
unicorn/prefer-add-event-listener-options
unicorn/prefer-aggregate-error
unicorn/prefer-array-find
βœ… unicorn/prefer-array-flat
βœ… unicorn/prefer-array-flat-map
unicorn/prefer-array-from-async
unicorn/prefer-array-from-map
unicorn/prefer-array-from-range
unicorn/prefer-array-index-of
unicorn/prefer-array-iterable-methods
unicorn/prefer-array-last-methods
unicorn/prefer-array-slice
βœ… unicorn/prefer-array-some
unicorn/prefer-at
unicorn/prefer-await
unicorn/prefer-bigint-literals
unicorn/prefer-blob-reading-methods
unicorn/prefer-block-statement-over-iife
unicorn/prefer-boolean-return
unicorn/prefer-class-fields
unicorn/prefer-classlist-toggle
unicorn/prefer-code-point
unicorn/prefer-continue
unicorn/prefer-date-now
unicorn/prefer-default-parameters
unicorn/prefer-direct-iteration
unicorn/prefer-dom-node-append
unicorn/prefer-dom-node-html-methods
unicorn/prefer-dom-node-remove
unicorn/prefer-dom-node-replace-children
unicorn/prefer-dom-node-text-content
unicorn/prefer-early-return
unicorn/prefer-else-if
unicorn/prefer-event-target
unicorn/prefer-export-from
unicorn/prefer-flat-math-min-max
unicorn/prefer-get-or-insert-computed
unicorn/prefer-global-number-constants
unicorn/prefer-global-this
unicorn/prefer-group-by
unicorn/prefer-has-check
unicorn/prefer-hoisting-branch-code
unicorn/prefer-https
unicorn/prefer-identifier-import-export-specifiers
unicorn/prefer-includes
unicorn/prefer-includes-over-repeated-comparisons
unicorn/prefer-iterable-in-constructor
unicorn/prefer-iterator-helpers
unicorn/prefer-iterator-to-array
unicorn/prefer-iterator-to-array-at-end
unicorn/prefer-keyboard-event-key
unicorn/prefer-location-assign
unicorn/prefer-logical-operator-over-ternary
unicorn/prefer-map-from-entries
unicorn/prefer-math-abs
unicorn/prefer-math-constants
unicorn/prefer-math-min-max
unicorn/prefer-math-trunc
unicorn/prefer-minimal-ternary
unicorn/prefer-modern-dom-apis
unicorn/prefer-modern-math-apis
unicorn/prefer-module
unicorn/prefer-native-coercion-functions
unicorn/prefer-negative-index
βœ… unicorn/prefer-node-protocol
unicorn/prefer-number-coercion
unicorn/prefer-number-is-safe-integer
βœ… unicorn/prefer-number-properties
unicorn/prefer-object-define-properties
unicorn/prefer-object-destructuring-defaults
unicorn/prefer-object-from-entries
unicorn/prefer-object-iterable-methods
unicorn/prefer-observer-apis
unicorn/prefer-optional-catch-binding
unicorn/prefer-path2d
unicorn/prefer-private-class-fields
unicorn/prefer-promise-try
unicorn/prefer-promise-with-resolvers
unicorn/prefer-prototype-methods
unicorn/prefer-query-selector
unicorn/prefer-queue-microtask
unicorn/prefer-reflect-apply
unicorn/prefer-regexp-test
unicorn/prefer-response-static-json
unicorn/prefer-scoped-selector
βœ… unicorn/prefer-set-has
unicorn/prefer-set-methods
unicorn/prefer-set-size
unicorn/prefer-simple-condition-first
unicorn/prefer-simple-sort-comparator
unicorn/prefer-simplified-conditions
unicorn/prefer-single-array-predicate
unicorn/prefer-single-call
unicorn/prefer-single-object-destructuring
unicorn/prefer-single-replace
unicorn/prefer-smaller-scope
unicorn/prefer-split-limit
unicorn/prefer-spread
unicorn/prefer-string-match-all
unicorn/prefer-string-pad-start-end
unicorn/prefer-string-raw
unicorn/prefer-string-repeat
unicorn/prefer-string-replace-all
unicorn/prefer-string-slice
unicorn/prefer-string-starts-ends-with
unicorn/prefer-string-trim-start-end
unicorn/prefer-structured-clone
unicorn/prefer-switch
βœ… unicorn/prefer-ternary
unicorn/prefer-then-catch
unicorn/prefer-toggle-attribute
unicorn/prefer-top-level-await
unicorn/prefer-type-error
unicorn/prefer-type-literal-last
unicorn/prefer-unary-minus
unicorn/prefer-unicode-code-point-escapes
unicorn/prefer-url-can-parse
unicorn/prefer-url-href
unicorn/prefer-url-search-parameters
unicorn/prefer-while-loop-condition
unicorn/relative-url-style
βœ… unicorn/require-array-join-separator
unicorn/require-array-sort-compare
unicorn/require-css-escape
unicorn/require-module-attributes
unicorn/require-module-specifiers
βœ… unicorn/require-number-to-fixed-digits-argument
unicorn/require-passive-events
unicorn/require-proxy-trap-boolean-return
unicorn/switch-case-braces
unicorn/switch-case-break-position
unicorn/template-indent
unicorn/text-encoding-identifier-case
unicorn/throw-new-error

Not recommended rules

βœ… 0 Β |Β  🚫 0 Β /Β  Total: 27
Status Name
unicorn/comment-content
unicorn/consistent-destructuring
unicorn/consistent-function-style
unicorn/custom-error-definition
unicorn/id-match
unicorn/no-array-front-mutation
unicorn/no-asterisk-prefix-in-documentation-comments
unicorn/no-invalid-file-input-accept
unicorn/no-keyword-prefix
unicorn/no-manually-wrapped-comments
unicorn/no-missing-local-resource
unicorn/no-unreadable-new-expression
unicorn/no-unsafe-dom-html
unicorn/no-unused-properties
unicorn/prefer-dispose
unicorn/prefer-error-is-error
unicorn/prefer-explicit-viewport-units
unicorn/prefer-import-meta-properties
unicorn/prefer-iterator-concat
unicorn/prefer-regexp-escape
unicorn/prefer-short-arrow-method
unicorn/prefer-temporal
unicorn/prefer-uint8array-base64
unicorn/require-frontmatter-fields
unicorn/require-post-message-target-origin
unicorn/string-content
unicorn/try-complexity

Deprecated rules

βœ… 0 Β |Β  🚫 8 Β /Β  Total: 8
Status Name Rationale
🚫 unicorn/no-instanceof-array Replaced by unicorn/no-instanceof-builtins
🚫 unicorn/no-array-push-push Replaced by unicorn/prefer-single-call
🚫 unicorn/no-length-as-slice-end Replaced by unicorn/no-unnecessary-slice-end
🚫 unicorn/no-hex-escape Replaced by unicorn/prefer-unicode-code-point-escapes
🚫 unicorn/prevent-abbreviations Renamed to unicorn/name-replacements
🚫 unicorn/prefer-dom-node-dataset Renamed to unicorn/dom-node-dataset
🚫 unicorn/prefer-json-parse-buffer Renamed to unicorn/consistent-json-file-read
🚫 unicorn/better-regex Removed due to bugs and lack of support in the underlying library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions