ESLint has default configuration. And global-strict is on by default with a
flag “never”. .eslintrc overrides global configuration, but if you do not
override specific rule, then the value from the default config is going to be
used. Here’s a link to default configuration:
https://github.com/eslint/eslint/blob/master/conf/eslint.json
Thanks,
Ilya Volodin
From: [email protected] [mailto:[email protected]] On Behalf Of
Julian japannext
Sent: Wednesday, March 25, 2015 9:19 PM
To: Nicholas Zakas
Cc: [email protected]
Subject: Re: [ESLint] How can I see which rules apply and where they are
defined?
Hi Nicholas,
Thank you for your reply.
However, I don't have a global-strict rule set in my .eslintrc. So I'm
wondering how to find out where that is picked up. When doing `find . -name
.eslintrc` in my home directory, I can see that there is no .eslintrc file that
is an "ancestor" to the file I'm linting...
Best regards,
Julian
On Wed, Mar 25, 2015 at 3:00 AM, Nicholas Zakas <[email protected]
<mailto:[email protected]> > wrote:
Hi Julian,
"global-strict" is a different rule than "strict" (the former is deprecated,
the latter is the recommended one). Note in the line that you pasted,
"global-strict" is explicitly mentioned on the far-right. You should always use
that value as a guide to determine which rule the warning is coming from.
So if you set global-strict to 0, you won't get that error anymore.
-N
On Mon, Mar 23, 2015 at 6:27 PM, Julian <[email protected]
<mailto:[email protected]> > wrote:
I have a .eslintrc file in my home directory that eslint picks up most of the
cases, e.g. when I change "no-underscore-dangle" from 0 to 2 I can see errors
in my editor where I use underscores for my private variables.
However, when I set "strict": [0, "global"], I still get errors for my 'use
sctrict' expression at the top of my file. When running eslint in cli, I get:
1:0 error Use the function form of "use strict" global-strict
It seems to me that some of my rules settings get overridden somewhere, but I
can't find out where that is happening. How can I find what rules are applied
and where they are defined?
Best regards,
Julian
--
You received this message because you are subscribed to the Google Groups
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected]
<mailto:[email protected]> .
For more options, visit https://groups.google.com/d/optout.
--
______________________________
Nicholas C. Zakas
@slicknet
Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3
--
You received this message because you are subscribed to the Google Groups
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected]
<mailto:[email protected]> .
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.