Socket
Socket
Sign inDemoInstall

eslint-plugin-functions

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-functions

This plugin contains lint rules related to function declarations.


Version published
Weekly downloads
537
decreased by-34.67%
Maintainers
1
Install size
5.39 kB
Created
Weekly downloads
 

Readme

Source

eslint-plugin-functions

This plugin contains lint rules related to function declarations.

Installation

  1. Add eslint-plugin-functions to your devDependencies.

  2. Add functions to the plugins section of your ESLint configuration.

{
  "plugins": ["functions"]
}
  1. Enable the rule(s) that you want ESLint to enforce.
{
  "rules": {
    "functions/top-level-fn-decl": "warn"
  }
}

Rules

There's currently just one lint rule in this package.

top-level-fn-decl

This rule enforces that the all top-level functions should be function declarations.

Example:

// Correct usage (no lint warning)
function foo() {
  return;
}

// Incorrect usage (raises lint warning)
const foo = () => {
  return;
};

FAQs

Last updated on 20 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc