back to home

sindresorhus / eslint-plugin-unicorn

More than 100 powerful ESLint rules

4,954 stars
439 forks
376 issues
JavaScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing sindresorhus/eslint-plugin-unicorn in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/sindresorhus/eslint-plugin-unicorn)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

eslint-plugin-unicorn > More than 100 powerful ESLint rules You might want to check out XO, which includes this plugin. **Propose or contribute a new rule ➑** Install **Requires ESLint , flat config, and ESM.** Usage Use a preset config or configure each rule in . If you don't use the preset, ensure you use the same config as below. Rules πŸ’Ό Configurations enabled in.\ βœ… Set in the configuration.\ β˜‘οΈ Set in the configuration.\ πŸ”§ Automatically fixable by the CLI option.\ πŸ’‘ Manually fixable by editor suggestions. | NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | πŸ”§ | πŸ’‘ | | :----------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--- | :- | :- | | better-regex | Improve regexes by making them shorter, consistent, and safer. | | πŸ”§ | | | catch-error-name | Enforce a specific parameter name in catch clauses. | βœ… | πŸ”§ | | | consistent-assert | Enforce consistent assertion style with . | βœ… | πŸ”§ | | | consistent-date-clone | Prefer passing directly to the constructor when cloning. | βœ… β˜‘οΈ | πŸ”§ | | | consistent-destructuring | Use destructured variables over properties. | | | πŸ’‘ | | consistent-empty-array-spread | Prefer consistent types when spreading a ternary in an array literal. | βœ… | πŸ”§ | | | consistent-existence-index-check | Enforce consistent style for element existence checks with , , , and . | βœ… β˜‘οΈ | πŸ”§ | | | consistent-function-scoping | Move function definitions to the highest possible scope. | βœ… | | | | consistent-template-literal-escape | Enforce consistent style for escaping in template literals. | βœ… | πŸ”§ | | | custom-error-definition | Enforce correct subclassing. | | πŸ”§ | | | empty-brace-spaces | Enforce no spaces between braces. | βœ… | πŸ”§ | | | error-message | Enforce passing a value when creating a built-in error. | βœ… β˜‘οΈ | | | | escape-case | Require escape sequences to use uppercase or lowercase values. | βœ… β˜‘οΈ | πŸ”§ | | | expiring-todo-comments | Add expiration conditions to TODO comments. | βœ… β˜‘οΈ | | | | explicit-length-check | Enforce explicitly comparing the or property of a value. | βœ… | πŸ”§ | πŸ’‘ | | filename-case | Enforce a case style for filenames. | βœ… | | | | import-style | Enforce specific import styles per module. | βœ… β˜‘οΈ | | | | isolated-functions | Prevent usage of variables from outside the scope of isolated functions. | βœ… | | | | new-for-builtins | Enforce the use of for all builtins, except , , , and . | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | | no-abusive-eslint-disable | Enforce specifying rules to disable in comments. | βœ… β˜‘οΈ | | | | no-accessor-recursion | Disallow recursive access to within getters and setters. | βœ… β˜‘οΈ | | | | no-anonymous-default-export | Disallow anonymous functions and classes as the default export. | βœ… β˜‘οΈ | | πŸ’‘ | | no-array-callback-reference | Prevent passing a function reference directly to iterator methods. | βœ… | | πŸ’‘ | | no-array-for-each | Prefer over the method. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | | no-array-method-this-argument | Disallow using the argument in array methods. | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | | no-array-reduce | Disallow and . | βœ… | | | | no-array-reverse | Prefer over . | βœ… β˜‘οΈ | | πŸ’‘ | | no-array-sort | Prefer over . | βœ… β˜‘οΈ | | πŸ’‘ | | no-await-expression-member | Disallow member access from await expression. | βœ… | πŸ”§ | | | no-await-in-promise-methods | Disallow using in method parameters. | βœ… β˜‘οΈ | | πŸ’‘ | | no-console-spaces | Do not use leading/trailing space between parameters. | βœ… β˜‘οΈ | πŸ”§ | | | no-document-cookie | Do not use directly. | βœ… β˜‘οΈ | | | | no-empty-file | Disallow empty files. | βœ… β˜‘οΈ | | | | no-for-loop | Do not use a loop that can be replaced with a loop. | βœ… | πŸ”§ | πŸ’‘ | | no-hex-escape | Enforce the use of Unicode escapes instead of hexadecimal escapes. | βœ… β˜‘οΈ | πŸ”§ | | | no-immediate-mutation | Disallow immediate mutation after variable assignment. | βœ… | πŸ”§ | πŸ’‘ | | no-instanceof-builtins | Disallow with built-in objects | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | | no-invalid-fetch-options | Disallow invalid options in and . | βœ… β˜‘οΈ | | | | no-invalid-remove-event-listener | Prevent calling with the result of an expression. | βœ… β˜‘οΈ | | | | no-keyword-prefix | Disallow identifiers starting with or . | | | | | no-lonely-if | Disallow statements as the only statement in blocks without . | βœ… β˜‘οΈ | πŸ”§ | | | no-magic-array-flat-depth | Disallow a magic number as the argument in | βœ… β˜‘οΈ | | | | no-named-default | Disallow named usage of default import and export. | βœ… β˜‘οΈ | πŸ”§ | | | no-negated-condition | Disallow negated conditions. | βœ… β˜‘οΈ | πŸ”§ | | | no-negation-in-equality-check | Disallow negated expression in equality check. | βœ… β˜‘οΈ | | πŸ’‘ | | no-nested-ternary | Disallow nested ternary expressions. | βœ… | πŸ”§ | | | no-new-array | Disallow . | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | | no-new-buffer | Enforce the use of and instead of the deprecated . | βœ… β˜‘οΈ | πŸ”§ | πŸ’‘ | | no-null | Disallow the use of the literal. | βœ… | πŸ”§ | πŸ’‘ | | no-object-as-default-parameter | Disallow the use of objects as default parameters. | βœ… β˜‘οΈ | | | | no-process-exit | Disallow . | βœ… β˜‘οΈ | | | | no-single-promise-in-promise-methods | Disallow passing single-element arrays to methods. _...truncated for preview_