google / eslint-config-google

ESLint shareable config for the Google JavaScript style guide
Apache License 2.0
1.75k stars 139 forks source link

Polymer({...}) generates new-cap error #25

Closed dandv closed 7 years ago

dandv commented 8 years ago

Typical Polymer code such as

Polymer({
  is: 'my-view1',
  ...
});

generates the A function with a name starting with an uppercase letter should only be used as a constructor. (new-cap) error due to 'new-cap': 2,.

stramel commented 7 years ago

You could add this in your globals section

philipwalton commented 7 years ago

AFAIK, Polymer has its own JS style guide, so I don't think we need to make any exceptions here for Polymer. Polymer could create it's own eslint config that extends Google if it wants.