Skip to content

deskpro/eslint-plugin-deskpro-product

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-deskpro

Deskpro specific eslint rules

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @deskpro/eslint-plugin-deskpro-product:

npm install @deskpro/eslint-plugin-deskpro-product --save-dev

Usage (locally)

Add @deskpro/eslint-plugin-deskpro-product to your dev dependencies. Use the link:../../../ format if you're running it locally - you'll need to re-install it on every change.

Add @deskpro/eslint-plugin-deskpro-product to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["@deskpro/deskpro-product"]
}

Then configure the rules you want to use under the rules section in .eslintrc.js

{
  "rules": {
    "@deskpro/deskpro-product/no-concatenated-formatMessage-id": "error",
    "@deskpro/deskpro-product/no-concatenated-translate-id": "error"
  }
}

Rules

🔧 Automatically fixable by the --fix CLI option.

Name Description 🔧
no-concatenated-formatMessage-id Disallow concatenation of formatMessage id
no-concatenated-translate-id Disallow concatenation of Translate id
styled-tspan-must-have-as-attribute Styled TSpan element attributes must contain 'as'. 🔧

About

Deskpro product specific eslint rules

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •