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

@otovo/eslint-config-otovo

Package Overview
Dependencies
Maintainers
8
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@otovo/eslint-config-otovo

A set of eslint-configs for Otovo projects

  • 4.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
57
decreased by-1.72%
Maintainers
8
Weekly downloads
 
Created
Source

Otovo eslint config

This repo contains sets of opinionated linting rules (eslint-configs) for Otovo projects.

Installing

yarn add --dev @otovo/eslint-config-otovo

# or using npm:

npm install --save-dev @otovo/eslint-config-otovo

Quick start

Depending on your project, add one of these to your .eslintrc file:

  • Pure JS: @otovo/eslint-config-otovo
  • React without types: @otovo/eslint-config-otovo/react-recommended
  • React with Flow: @otovo/eslint-config-otovo/react-flow-recommended
  • React with Typescript: @otovo/eslint-config-otovo/react-typescript-recommended

Example .eslintrc using React with Flow:

{
  "env": { "browser": true },
  "extends": ["@otovo/eslint-config-otovo/react-flow-recommended"]
}

Slow start

eslint-config-otovo consists of several small sets of rules:

  • javascript
  • react
  • flowtype
  • typescript
  • prettier
  • prettier-react
  • prettier-flowtype
  • prettier-typescript

For a given project, you will probably need several of them. For example: If you want to add javascript and react, prettier and prettier-react to your repo, add the following to your .eslintrc config:

{
  "env": {
    "browser": true
  },
  "extends": [
    "@otovo/eslint-config-otovo/javascript",
    "@otovo/eslint-config-otovo/react",
    "@otovo/eslint-config-otovo/prettier",
    "@otovo/eslint-config-otovo/prettier-react"
  ]
}

Instead of adding rule sets one by one, you can use one of four collections:

  • @otovo/eslint-config-otovo
  • @otovo/eslint-config-otovo/react-recommended
  • @otovo/eslint-config-otovo/react-flow-recommended
  • @otovo/eslint-config-otovo/react-typescript-recommended

You use collections in the same way you add rule sets: By adding them to the extends array in .eslintrc:

{
  "env": {
    "browser": true
  },
  "parser": "babel-eslint",
  "extends": ["@otovo/eslint-config-otovo/react-flow-recommended"]
}

The following is a overview of the rules each collection includes:

defaultreact-recommendedreact-flow-recommendedreact-typescript-recommended
javascript
prettier
react
prettier-react
flowtype
prettier-flowtype
typescript
prettier-typescript

Publishing

This package is hosted on npm under @otovo/eslint-config-otovo namespace and is published using np. To publish a new version, run

yarn release --no-tests

(We currently don't have any tests)

Doing so guides you through publishing to npm, pushing tags to Github and create release notes.

Keywords

FAQs

Package last updated on 23 Mar 2021

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