Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-unicorn

Package Overview
Dependencies
Maintainers
3
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-unicorn

Various awesome ESLint rules

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3M
decreased by-22.28%
Maintainers
3
Weekly downloads
 
Created

What is eslint-plugin-unicorn?

The eslint-plugin-unicorn package is a set of ESLint rules that aim to improve code quality by enforcing best practices, preventing common mistakes, and suggesting modern syntax and methods. It includes a variety of rules that are not covered by the core ESLint rules or other plugins, focusing on code enhancements and consistency.

What are eslint-plugin-unicorn's main functionalities?

Filename Case

Enforces a specific case for filenames, which can be configured to be kebab-case, camelCase, or snake_case. This helps maintain consistency in the naming of files across a project.

"unicorn/filename-case": ["error", {"case": "kebabCase"}]

Number Literal Case

Enforces lowercase identifier and uppercase value for number literals, improving readability and consistency in the code.

"unicorn/number-literal-case": "error"

Prevent Abbreviations

Discourages the use of abbreviations in variable names, function names, and other identifiers to improve code clarity and readability.

"unicorn/prevent-abbreviations": ["error", {"replacements": {"temp": false, "err": {"error": true}}}]

Better Regex

Suggests simpler and more optimized regular expressions to improve performance and readability.

"unicorn/better-regex": "error"

Consistent Function Scoping

Enforces that functions are defined at the highest possible level, which can help with readability and reduce the complexity of nested functions.

"unicorn/consistent-function-scoping": "error"

Other packages similar to eslint-plugin-unicorn

Keywords

FAQs

Package last updated on 10 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc