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

How to opt out of specific rules in package.json ? #111

Closed
nelsonic opened this issue May 17, 2016 · 4 comments
Closed

How to opt out of specific rules in package.json ? #111

nelsonic opened this issue May 17, 2016 · 4 comments

Comments

@nelsonic
Copy link

Hi @Flet,
Since upgrading to the latest version of Semistandard (8.0.0)
we are getting a lot of "Identifier 'variable_name' is not in camel case" ...
But we want to use snake_case for our variables so they are easy to distinguish.
How do we set this in package.json ?
Tried:

  "semistandard": {
    "rules": {
      "camelcase": false
    },
  }

But no luck.
Can you please help and/or point us to the place in the docs where its explained how to ignore a certain rule? thanks!

@Flet
Copy link
Member

Flet commented May 17, 2016

One of the goals of standard (and semistandard) is to avoid custom configuration to make it a simple, consistent linting tool.

I realize this new rule can cause pain for folks who prefer snake_case that have existing projects using semistandard. With semistandard, the goal is to only deviate from standard regarding semicolons and nothing else.

Its possible to ignore rules via eslint ignore comments at the top of each file, but it sounds this may not be sufficient for your needs.

Its also possible to instead use eslint directly via .eslintrc. Just extend the semistandard shareable config and layer rule changes on top (https://github.com/flet/eslint-config-semistandard).

And finally its very easy to take a shareable config and build a CLI interface that behaves just like semistandard using standard-engine (basically just fork this repo and change the eslintrc.json 😄).

I hope one of these solutions is acceptable!

@nelsonic
Copy link
Author

@Flet thanks for your prompt reply. 👍
We have over a hundred projects using semistandard which now say devDependencies "_out of date_" due to the update. But when we run semistandard on any of them we get errors where we did not have any before... also there's no release/notes (on GitHub) for the latest version (published on NPM) https://github.com/Flet/semistandard/releases
semistandard-no-release-notes-for-latest-version
So it was not possible to know up-front that the latest version would "break" our build.
Thanks again for building a great linter and for the advice.
For now we will continue to use semistandard@7.0.5 until we have time to implement our own.

nelsonic added a commit to numo-labs/lambda-ne-classic-package-provider that referenced this issue May 17, 2016
@Flet
Copy link
Member

Flet commented May 17, 2016

Apologies for that, I forgot to push the tag :/

Here are details on the new rules:
https://github.com/Flet/semistandard/blob/master/CHANGELOG.md

@Flet
Copy link
Member

Flet commented Jun 1, 2016

@nelsonic I'm closing this for now. Apologies again for the breakage and the lack of communication.

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

No branches or pull requests

2 participants