Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Plugin rules #4

Open
dgesteves opened this issue Oct 27, 2019 · 4 comments
Open

New Plugin rules #4

dgesteves opened this issue Oct 27, 2019 · 4 comments
Labels

Comments

@dgesteves
Copy link

dgesteves commented Oct 27, 2019

I have a question regarding the new version of the plugin, any specific reason why the new version comes with:
props can’t be mutable and the jsdoc are required on props etc…, inline events can't be an arrow function?
Are this changes required because of the new outputs to react and angular?

@dgesteves
Copy link
Author

dgesteves commented Oct 28, 2019

So just an update my rules atm are the ones that you recommend on this new version.

  "@stencil/async-methods": "error",
  "@stencil/ban-prefix": ["error", ["stencil", "stnl", "st"]],
  "@stencil/decorators-context": "error",
  "@stencil/decorators-style": [
    "error", {
      "prop": "inline",
      "state": "inline",
      "element": "inline",
      "event": "inline",
      "method": "multiline",
      "watch": "multiline",
      "listen": "multiline"
    }],
  "@stencil/element-type": "error",
  "@stencil/host-data-deprecated": "error",
  "@stencil/methods-must-be-public": "error",
  "@stencil/no-unused-watch": "error",
  "@stencil/own-methods-must-be-private": "error",
  "@stencil/own-props-must-be-private": "error",
  "@stencil/prefer-vdom-listener": "error",
  "@stencil/props-must-be-public": "error",
  "@stencil/props-must-be-readonly": "error",
  "@stencil/render-returns-host": "error",
  "@stencil/required-jsdoc": "error",
  "@stencil/reserved-member-names": "error",
  "@stencil/single-export": "error",
  "@stencil/strict-mutable": "error"
}

I am trying to understand why do we need to use immutable props now.

@dgesteves
Copy link
Author

I am still waiting for a replay.
Your new stencil plugin version is coming with alot of new errors and warnings, that is a problem to use git hooks with the libraries.

@jayyren
Copy link

jayyren commented Sep 1, 2021

Is there any additional info how this rule specifies if prop is mutable or not?

@m-thompson-code
Copy link

Ensures that all @prop marked as mutable really needs to be mutable.

This is a little too critic. I don't know if this implies a way for me to mark the Prop as "really needs to be mutable" or if I'm just expected to disable the rule for this line/file/config.

I assume that Props aren't mutable by default for a reason, but I'd love to know the reasoning for this rule to be way it is and what this message is implying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants