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

Linter tries (and fail) to analyze nodejs javascript code. #149

Closed
nicolasnoble opened this issue Apr 15, 2018 · 1 comment
Closed

Linter tries (and fail) to analyze nodejs javascript code. #149

nicolasnoble opened this issue Apr 15, 2018 · 1 comment

Comments

@nicolasnoble
Copy link

Consider the following project that has some genuine Polymer files in it, and some nodejs code. Sample nodejs code:

const somePackage = require('somePackage')

class MyClass extends somePackage.SomeBaseClass {

While not a polymer file, polymer-lint will attempt to lint this, and will fail, saying it can't find the somePackage.SomeBaseClass superclass.

Exact linter output:

class MyClass extends somePackage.SomeBaseClass {
                      ~~~~~~~~~~~~~~~~~~~~~~~~~

polymer-linter-fail.js(2,22) warning [unknown-superclass] - Unable to resolve superclass somePackage.SomeBaseClass

I couldn't find any good method to either disable the linter or to tell it that this class actually exists.

@nicolasnoble
Copy link
Author

The following linter options are actually doing a good job at fixing this:

{
  "lint": {
    "rules": ["polymer-2-hybrid"],
    "ignoreWarnings": [
      "unknown-superclass"
    ]
  }
}

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

No branches or pull requests

1 participant