New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@locker/eslint-rule-maker

Package Overview
Dependencies
Maintainers
6
Versions
237
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.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-4.93%
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 30 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