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

False positive tslint-plugin-prettier, tslint-react, tslint-sonarts #314

Closed
VincentLanglet opened this issue Feb 7, 2019 · 11 comments · Fixed by #457
Closed

False positive tslint-plugin-prettier, tslint-react, tslint-sonarts #314

VincentLanglet opened this issue Feb 7, 2019 · 11 comments · Fixed by #457

Comments

@VincentLanglet
Copy link
Contributor

Bug Description

Unused dependencies :

* tslint-plugin-prettier
* tslint-react
* tslint-sonarts

Missing dependencies :

* tslint-config-tslint:all
* tslint-config-tslint-react
* tslint-config-tslint-sonarts

Code snippets

Where the dependency is used:

tslint.json

{
  "extends": ["tslint:all", "tslint-react", "tslint-sonarts", "tslint-config-prettier"],
  "rulesDirectory": ["tslint-plugin-prettier"],
  ...
}

Where the dependency is listed in package.json:

    "tslint": "^5.12.0",
    "tslint-config-prettier": "^1.18.0",
    "tslint-plugin-prettier": "^2.0.1",
    "tslint-react": "^3.6.0",
    "tslint-sonarts": "^1.8.0",

Versions

  • node -v: v11.6.0
  • npm -v: 6.5.0-next.0
  • depcheck --version: 0.7.1
@stale
Copy link

stale bot commented Nov 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 2, 2019
@VincentLanglet
Copy link
Contributor Author

This still should be fixed

@stale stale bot removed the wontfix label Nov 2, 2019
@rumpl
Copy link
Member

rumpl commented Nov 2, 2019

Could you check with the latest depcheck please, I just added a testcase and it seems to work.

Thanks

@VincentLanglet
Copy link
Contributor Author

I got unused with

* tslint-plugin-prettier

But i got unused too for

* prettier

This is maybe related.

I do have .prettierrc in my project

@rumpl
Copy link
Member

rumpl commented Nov 2, 2019

And tslint-plugin-prettier is used in rulesDirectory?

@VincentLanglet
Copy link
Contributor Author

cat tslint.json returns

{
  "extends": ["tslint:all", "tslint-react", "tslint-sonarts", "tslint-config-prettier"],
  "rulesDirectory": ["tslint-plugin-prettier"],
  "jsRules": true,
  "rules": {
    // From tslint
    "completed-docs": false,
    "file-name-casing": [true, { "^index.tsx|.ts$": "camel-case", ".tsx": "pascal-case" }],
    "interface-name": [true, "never-prefix"],
    "match-default-export-name": false,
    "no-default-import": false,
    "no-default-export": false,
    "no-import-side-effect": false,
    "no-magic-numbers": false,
    "no-null-keyword": false,
    "no-null-undefined-union": false,
    "no-submodule-imports": false,
    "no-use-before-declare": false,
    "no-unsafe-any": false,
    "no-void-expression": [true, "ignore-arrow-function-shorthand"],
    "strict-boolean-expressions": false,
    "typedef": [
      true,
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "member-variable-declaration"
    ],
    "variable-name": [true, "allow-pascal-case"],

    // From plugin-prettier
    "prettier": true
  }
}

@rumpl
Copy link
Member

rumpl commented Nov 2, 2019

Would it be possible to create a minimal repo that reproduces this bug please? That would be immensely helpful

@VincentLanglet
Copy link
Contributor Author

@rumpl
Copy link
Member

rumpl commented Nov 2, 2019

Awesome, thanks!

@rumpl
Copy link
Member

rumpl commented Nov 2, 2019

It's soooo much easier to debug with a real repo...

@rumpl rumpl closed this as completed in #457 Nov 2, 2019
@rumpl
Copy link
Member

rumpl commented Nov 2, 2019

Fixed, thanks!

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

Successfully merging a pull request may close this issue.

2 participants