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

eslint-plugin-prettier-doc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-prettier-doc

ESLint rules for Prettier Doc.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-plugin-prettier-doc Coverage

ESLint rules for Prettier Doc.

Install

yarn add eslint-plugin-prettier-doc --dev

Usage

Add prettier-doc to the plugins and extends sections of your .eslintrc configuration file.

{
  "extends": ["plugin:prettier-doc/recommended"]
}

Rules

no-concat

concat(…) has been deprecated, use array instead.

This rule is fixable.

Please disable this rule before fixing no-nested-concat, and no-single-doc-concat, they both relay on checking concat(…) call

// Fail
const doc = concat(['prettier', line, '(', line, ')'])
// Pass
const doc = ['prettier', line, '(', line, ')']

no-empty-flat-contents-for-if-break

The second argument (flatContents) for ifBreak(…) should omitted when it's empty.

This rule is fixable.

// Fail
const comma = ifBreak(',', '')
// Pass
const comma = ifBreak(',')

no-nested-concat

Nested concat(…) should be flatted.

This rule is fixable.

// Fail
const doc = concat(['prettier', concat([line, '(', line, ')'])])
// Pass
const doc = concat(['prettier', line, '(', line, ')'])

no-single-document-concat

Single Doc should use directly.

This rule is fixable.

// Fail
const doc = concat(['prettier()'])
// Pass
const doc = 'prettier()'

FAQs

Package last updated on 08 Feb 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