Code Monkey home page Code Monkey logo

Comments (6)

voliva avatar voliva commented on May 25, 2024 2

Sure, I'll give it a go this afternoon!

from react-rxjs.

josepot avatar josepot commented on May 25, 2024 1

It looks awesome, my only reservation is with the name of the rule... I think that instead of connect-in-components it should be named no-connect-in-components. I think that name is a bit more consistent with other standard eslint-rules, e.g. no-await-in-loop, no-console, no-import-assign, etc

from react-rxjs.

josepot avatar josepot commented on May 25, 2024 1

I'm closing this issue, let's continue the conversation in that PR/repo. Once again, thanks a lot @voliva !

from react-rxjs.

voliva avatar voliva commented on May 25, 2024

I've been playing with ESLint and AST for a bit and I got something working

image

At the moment what it does is just check that the function call is not happening inside a function or a class. It also handles:

  • import { connectObservable as co } from 'react-rxjs' and then using co inside a component.
  • import * as ReactRxJS from 'react-rxjs' and then calling ReactRxJS.connectObservable.
  • It won't show up an error if connectObservable is being called without importing it (e.g. the consumer has defined a function with that name)

I tried pushing the code so far to the re-rxjs organization but I couldn't - so I created the repo in my account: https://github.com/voliva/eslint-plugin-react-rxjs. Happy to move it when we feel it's ready to publish 🚀. It would be great to have some feedback on what's in so far.

from react-rxjs.

josepot avatar josepot commented on May 25, 2024

This is awesome! Thanks a lot @voliva !

I tried pushing the code so far to the re-rxjs organization but I couldn't

🤔 I can see that you created a private-repo under the org:

image

but you can't push to it? Weird... I will look into the settings to make sure that you can do these things.

from react-rxjs.

josepot avatar josepot commented on May 25, 2024

It's so weird that you weren't able to push the code... Anyways, I have made the repo public, then I have put the commit-history of your personal repo into that one, and then I've opened this PR.

from react-rxjs.

Related Issues (20)

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.