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

@tidio/eslint-plugin-tidio

Package Overview
Dependencies
Maintainers
0
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tidio/eslint-plugin-tidio

Tidio eslint ruleset

  • 5.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2K
decreased by-22.66%
Maintainers
0
Weekly downloads
 
Created
Source

@tidio/eslint-plugin-tidio

npm version

This package provides custom eslint configs for different uses.

Installation

To install run

yarn add -D @tidio/eslint-plugin-tidio @rushstack/eslint-patch

Usage

To add tidio plugin to your eslint config you should be adding individual configs (with plugin:@tidio/eslint-plugin-tidio/) prefix to extends array in your eslint rc file. One important thing to note is that you should add require("@rushstack/eslint-patch/modern-module-resolution"); to the top of your .eslintrc.js file. This package patches eslint to use its own module resolution. What it does in practice - you do not need to install any other packages than this one in your repository (normally you would need to install airbnb, eslint plugins etc). For more detailed info see @rushstack/eslint-patch

Example config can look like this:

require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
    parser: '@typescript-eslint/parser',
    extends: [
        'plugin:@tidio/eslint-plugin-tidio/react',
        'plugin:@tidio/eslint-plugin-tidio/translations',
    ]
};

Available configs

basic

To add it to your config add plugin:@tidio/eslint-plugin-tidio/basic to extends array.

This config extends airbnb-base config. It also extends prettier and recommended rules for typescript. Additionally there are rules which override some of airbnb rules and some that add new rules to this set. This config should be usable in any kind of repo (node, non-react repos etc).

This config is interchangeable with react config and those 2 should never be used at the same time

react

To add it to your config add plugin:@tidio/eslint-plugin-tidio/react to extends array.

This config is an extension of basic ruleset with some additional react-only rules. This config extends airbnb config instead of airbnb-base. In addition to basic and airbnb ruleset there are some additional react rules overrides, react-hooks rules and some other custom rules. This config should be usable in repos which use react

This config is interchangeable with basic config and those 2 should never be used at the same time

emotion

To add it to your config add plugin:@tidio/eslint-plugin-tidio/emotion to extends array.

It contains rules for CSS-in-JS emotion package.

translations

To add it to your config add plugin:@tidio/eslint-plugin-tidio/translations to extends array.

This ruleset disallows using strings as direct JSX children and it requires always importing from lang as trans.

jest

To add it to your config add plugin:@tidio/eslint-plugin-tidio/jest to extends array and update your settings object in eslint rc file with jest->version, for example:

settings: {
    jest: {
        version: 26,
    },
},

This config adds jest rules to your ruleset. It extends jest/recommended and jest/style configs.

redux

To add it to your config add plugin:@tidio/eslint-plugin-tidio/redux to extends array.

It adds custom redux rules.

storybook

To add it to your config add plugin:@tidio/eslint-plugin-tidio/storybook to extends array.

It adds some overrides for stories files.

testing library

To add it to your config add plugin:@tidio/eslint-plugin-tidio/testingLibrary to extends array.

Keywords

FAQs

Package last updated on 18 Oct 2024

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