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

@locker/eslint-rule-maker

Package Overview
Dependencies
Maintainers
6
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/eslint-rule-maker

Locker Next eslint rule maker utility

  • 0.11.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.4K
increased by10.63%
Maintainers
6
Weekly downloads
 
Created
Source

@locker/eslint-rule-maker

The @locker/eslint-rule-maker package is used to make linting rules for @locker.

Usage

Use createRule(config) when defining an eslint rule.

const { createRule } = require('@locker/eslint-rule-maker');

module.exports = createRule({
    // Add an optional meta object according to
    // https://eslint.org/docs/developer-guide/working-with-rules
    //
    // The following default values are provided:
    // `meta.fixable`: `'code'` (when specifying `rule.fix`)
    // `meta.type`: `'problem'`
    rule: {
        // The message provided to `context.report()`.
        message: 'Use of window.top is prohibited.',
        // The fix provided to `context.report()`.
        fix: 'window',
        // An array of object property paths to search for.
        search: ['window.top'],
    },
});

Keywords

FAQs

Package last updated on 15 Oct 2020

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