GithubHelp home page GithubHelp logo

eslint-config-ipfs's Introduction

IPFS is an open system to manage data without a central server

Check out our website at ipfs.tech.

For papers on IPFS, please see the Academic Papers section of the IPFS Docs.

License

MIT.

eslint-config-ipfs's People

Contributors

achingbrain avatar dependabot[bot] avatar diegorbaquero avatar gozala avatar hugomrdias avatar ipfs-mgmt-read-write[bot] avatar mpetrunic avatar semantic-release-bot avatar sgtpooki avatar web-flow avatar wemeetagain avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-config-ipfs's Issues

rename default branch to main

This repository for some reason goes against the conventional "main" branch and is using 'default' - not sure why? Can it be renamed to main for uniformity?

Disable @typescript-eslint/no-this-alias rule

This rule stops you from doing things like:

const self = this

function foo () {
  return self.derp()
}

It prefers:

const foo = () => {
  return this.derp()
}

Which is fine. The problem is fat-arrows can't be generator functions and we use them all over the place so you have to use this aliases:

const self = this

function * foo () {
  yield self.derp()
}

Change @typescript-eslint/return-await to `in-try-catch`?

The default setting for @typescript-eslint/return-await is ['error', 'always'].

This disallows code like:

async function myAsyncFunction () {
  return someOtherAsyncFunction()
}

instead demanding:

async function myAsyncFunction () {
  return await someOtherAsyncFunction()
}

It doesn't seem to make any difference to the stack traces and we have other rules that catch floating promises so I'm not sure what value it adds, and it occasionally raises some eyebrows.

The rule comes from standard but it's not even clear that the standard maintainers are for this version of the rule.

It does have another mode which is "in-try-catch", this disallows this sort of thing, demanding and await before the return, which seems a bit more useful, as it looks like the author might think any rejection would be caught which is not the case:

try {
  return someOtherAsyncFunction()
} catch (err) {
  // phew!
}

Shall we switch this rule to "in-try-catch"?

Cc @whizzzkid @SgtPooki

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.