Closed allochi closed 8 years ago
I'd also need help setting it up as my .eslintrc.json where I defined ExtJS as a global seems to be ignored.
@allochi @abraxxa I think you are looking for linter-eslint
Standard style is not supposed to be configurable, see this.
@ricardofbarros I think this issue can be closed.
Yes @despairblue is right, those questions are related to linter-eslint
My believe that it supports setting global variables also in an .eslintrc.json file came from hopping from one link to the next until I ended up there http://eslint.org/docs/user-guide/configuring. I don't want to modify any 'standard' rules but only define 'Ext' as a global variable because I use Sencha ExtJS in this project. Maybe you could add a sentence that configuration is only supported via package.json which works like a charm.
@abraxxa you're right, the readme could link to https://github.com/feross/standard#i-use-a-library-that-pollutes-the-global-namespace-how-do-i-prevent-variable-is-not-defined-errors
Would you mind to opening a PR?
Is using comments like in the linked example also supported in addition to the globals config in package.json?
I've sent the pull-request, feel free to extend it regarding configuration with comments.
Yes. Comments work as well. I'd prefer comments over the package.json since they make it obvious to you that you are using globals in that file. There are exceptions to this rule of course.
Thanks! As each ExtJS class is a separate file having the comment in each would be annoying. Is 'Ext' really a global variable? Isn't it a namespace?
Wouldn't a rose by any other name smell as sweet? :smiley:
You can call a global variable a namespace. Just be sure to know that you don't get any of the securities that languages supporting namespaces would give you. Like that you cannot redefine namespaces or their content.
Hi,
I'm sorry to bother you with this question, I really tried my best to find an answer to this and I couldn't.
I installed
eslint
, and installed this package to atom, usedeslint --init
to setup styles, and have a.eslintrc
file at the project root with thepackage.json
, but I don't know how to make this to work with the your package. Could you please give a detailed setup?Thanks!