Numbers Prefer Multiplication

    eslint-plugin-use-macros

    3.0.0 • Public • Published

    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
        }
      }
    `;

    Install

    npm i eslint-plugin-use-macros

    DownloadsWeekly Downloads

    1,190

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    6 kB

    Total Files

    7

    Last publish

    Collaborators

    • qnighy
    • izumin5210
    • wantedly_dev
    • kobayang
    • yamadayuki