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

eslint-config-monots

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-monots

Provides the monots eslint configuration

  • 0.11.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by650%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config-monots

This package provides the default eslint configurations used within the monots codebase.

Version Weekly Downloads Bundled size Typed Codebase MIT License

Installation

yarn add eslint-config-monots

Usage

In your package.json files add the following configuration

{
  "name": "my-cool-library",
  "version": "0.0.0",
  "eslintConfig": {
    "extends": ["monots"],
    "overrides": [
      {
        "files": ["*.ts", "*.tsx"],
        "extends": ["monots/full"],
        "parserOptions": {
          "project": ["./path/to/tsconfig.lint.json"]
        }
      },
      { "files": ["*.tsx"], "extends": ["monots/react"] }
    ]
  }
}

If you don't want to use your package.json file, you can use any of the supported eslint configuration formats to export a string, e.g. .eslintrc.json:

{
  "extends": ["monots"]
}

You can always add your own rules and disable any rules you don't like by adding a rules property to the configuration.

module.exports = {
  extends: ['monots'],
};

Motivation

This config is primarily for use within a monots repo. Rules are strict but they do allow multiple people working on a project to conform to the same standard.

Entrypoints

monots

Provides the default rules and sets the parser to use @typescript-eslint/parser.

monots/full

Provides stricter rules and the cpu intensive @typescript-eslint/eslint-plugin / eslint-plugin-import which should be scoped to *.ts files in your project.

monots/react

Rules for a react codebase.

monots/markdown

Experimental rules for markdown files. This currently doesn't interop well with @typescript-eslint/parser when the project option is set.

monots/full-off

Can be used to disable the full rule for certain groups of files.

module.exports = {
  extends: ['monots'],
  "overrides": [
      {
        "files": ["*.ts", "*.tsx"],
        "extends": ["monots/full"],
        "parserOptions": {
          "project": ["./path/to/tsconfig.lint.json"]
        }
      },
      { "files": ["*.tsx"], "extends": ["monots/react"] },

      // Disable the `full` rules for certain matching files.
      {"files": ["*.d.ts"], extends: ['monots/full-off'] }
    ]
  }
};

Keywords

FAQs

Package last updated on 27 May 2022

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