Nondeterministic Postrequisite Metaprotocol

    eslint-plugin-arrow-function-brace
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    eslint-plugin-arrow-function-brace

    ESLint plugin that checks if the arrow function can remove the brace.

    Installation

    npm install --save-dev eslint-plugin-arrow-function-brace
    

    Setup

    Touch .eslintrc

    {
      "plugins": [
        ...,
        "arrow-function-brace"
      ],
      "rules": {
        ...,
        "arrow-function-brace/arrow-function-brace": 1
      }
    }
    

    Example

    Show a warning message if the arrow function can remove the brace.

    const isAdult = (age) => {
      return age >= 20;
    };
    example-prj/index.ts
      1:1  warning  can remove the brace from the arrow function.
    
    ✖ 1 problem (0 errors, 1 warning)
    

    Lisence

    MIT

    Install

    npm i eslint-plugin-arrow-function-brace

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    7.76 kB

    Total Files

    14

    Last publish

    Collaborators

    • wataruun