Giter Club home page Giter Club logo

eslint-plugin-neverthrow's Introduction

eslint-plugin-neverthrow

npm version Downloads/month

Installation

Use npm or a compatibility tool to install.

npm install --save-dev eslint eslint-plugin-neverthrow @typescript-eslint/parser

Requirements

  • Node.js v8.10.0 or newer versions.
  • ESLint v5.16.0 or newer versions.
  • @typescript-eslint/parser

Usage

Write your config file such as .eslintrc.js.

module.exports = {
  plugins: ['neverthrow'],
  rules: {
    'neverthrow/must-use-result': 'error',
  },
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 2021,
    sourceType: 'module',
    project: ['./tsconfig.json'],
    tsconfigRootDir: __dirname,
  },
};

See also Configuring ESLint.

Configs

  • neverthrow/recommended ... enables the recommended rules.

Rules

Possible Errors

Rule ID Description
neverthrow/must-use-result Not handling neverthrow result is a possible error because errors could remain unhandleds. ⭐️

Semantic Versioning Policy

This plugin follows Semantic Versioning and ESLint's Semantic Versioning Policy.

Changelog

Contributing

Welcome your contribution!

See also ESLint Contribution Guide.

Development Tools

  • npm test runs tests.
  • npm run update updates the package version. And it updates src/configs/recommended.ts, lib/index.ts, and README.md's rule table. See also npm version CLI command.
  • npm run add-rule <RULE_ID> creates three files to add a new rule.

forked from mysticatea/template-eslint-plugin

eslint-plugin-neverthrow's People

Contributors

mdbetancourt avatar wesleyyue avatar supermacro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.