Socket
Socket
Sign inDemoInstall

eslint-plugin-use-macros

Package Overview
Dependencies
Maintainers
5
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-use-macros

ESLint rules for libraries which supports the babel-macros


Version published
Weekly downloads
5.3K
decreased by-13.79%
Maintainers
5
Weekly downloads
 
Created
Source

eslint-plugin-use-macros npm version

Installation

npm install --save eslint-plugin-use-macros
# or
yarn add eslint-plugin-use-macros

This plugin provides the rules to use the babel macros for specific libraries (such as styled-components and graphql-tag.)

  • styled-components -> styled-components/macro
    • use-macros/styled-components
  • graphql-tag -> graphql.macro
    • use-macros/graphql-tag
// invalid
import gql from "graphql-tag";

const QUERY = gql`
  query getUser {
    user {
      id
      title
    }
  }
`;

👇

// valid
import { gql } from "graphql.macro";

const QUERY = gql`
  query getUser {
    user {
      id
      title
    }
  }
`;

Keywords

FAQs

Package last updated on 23 Jul 2019

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