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

eslint-plugin-lint

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-lint

Load arbitrary ESLint rules into a single namespace

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27K
increased by61.69%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-lint Build Status

Load arbitrary ESLint rules from any number of directories, and use them under the lint/ namespace.

Install

$ npm install eslint-plugin-lint --save-dev

Usage

Consider a project with an .eslintrc.js at the root, and two directories with rules files:

my-project
├── .eslintrc.js
├─┬ my-rules
│ ├── no-foo.js
│ └── no-bar.js
└─┬ their-rules
  ├── no-baz.js
  └── no-qux.js

To make them available to ESLint, in the .eslintrc.js add:

const path = require('path');

// (1) Require "eslint-plugin-lint", then call `load` with the
//     rules directories.
require('eslint-plugin-lint').load(
  path.join(__dirname, 'my-rules'),   // Tip: Use an absolute path to 
  path.join(__dirname, 'their-rules') //      avoid cwd resolution issues.
);  

module.exports {
  plugins: [
    'lint' // (2) Add the "eslint-plugin-lint" package as a plugin.
  ],
  rules: {
    'lint/no-foo': 1, // (3) Declare the rules options with the "lint/"
    'lint/no-bar': 1, //     prefix, plus the rule file name without ".js".
    'lint/no-baz': 1,
    'lint/no-qux': 1
  }
};

Now the rules are available like any other as lint/no-foo, lint/no-ba, and so on.

Prior Art

Keywords

FAQs

Package last updated on 19 Feb 2018

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