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 package

  • 0.11.7
  • 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 help make linting rules for @locker.

Usage

Use the create() utility when defining an eslint rule.

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

module.exports = create({
    // Add a 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`: `'suggestion'`
    // `meta.docs.category`: `'Locker'`
    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: ['document.defaultView.top', 'window.top'],
    },
});

Keywords

FAQs

Package last updated on 03 Sep 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