Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:30
    ilyub commented #15090
  • 17:41
    eslint-github-bot[bot] labeled #14216
  • 17:41
    eslint-github-bot[bot] locked #14216
  • 17:41
    eslint-github-bot[bot] labeled #14259
  • 17:41
    eslint-github-bot[bot] locked #14259
  • 17:41
    eslint-github-bot[bot] labeled #14265
  • 17:41
    eslint-github-bot[bot] locked #14265
  • 17:41
    eslint-github-bot[bot] labeled #14266
  • 17:41
    eslint-github-bot[bot] locked #14266
  • 09:20
    boutahlilsoufiane edited #14963
  • 01:56
    ljharb commented #15100
  • 01:04
    varelajp commented #15100
  • 00:58
    ljharb commented #15100
  • 00:57
    boutahlilsoufiane commented #14963
  • 00:56
    varelajp commented #15100
  • 00:52
    boutahlilsoufiane edited #14963
  • 00:51
    boutahlilsoufiane edited #14963
  • 00:47
    ljharb commented #15100
  • 00:45
    boutahlilsoufiane edited #14963
  • 00:44
    varelajp commented #15100
shubhnik singh
@shubhniksingh_twitter
"rules": {
    "prettier/prettier": ["error", {
      "trailingComma": "es5",
      "singleQuote": true
    }],
What is the significance of this object
{
      "trailingComma": "es5",
      "singleQuote": true
    }
Filipe Oliveira
@fily55
I would like to create a rule that doesn't allow inline config for certain files. Is there anyway to do something like this?
Epaminaidos
@Epaminaidos
Is there any rule that treats variable-declarations the same way as every other decent language does? E.g. the following should not create a warning:
for(var i=0;i<100;i++) { / Do something / }
for(var i=0;i<50;i++) { / Do something else / }
But the following should:
for(var i=0;i<100;i++) { / Do something / }
return i; //<- usage out of scope
Essentially, it should replace every "var" with a "let" and check the result.
Kevin Partington
@platinumazure
@shubhniksingh_twitter That object represents configuration options for the "prettier" rule in the "eslint-plugin-prettier" package. I would recommend checking the documentation in that plugin to understand how the configuration options work.
@fily55 I don't know of a way to do this by rule at this point, sorry.
@Epaminaidos You can use no-var to disallow var declarations entirely, or block-scoped-var to report references to a var-declared variable that are outside the block scope in which it was declared. I think you probably want block-scoped-var in your case.
shubhnik singh
@shubhniksingh_twitter
@platinumazure the array corresponding to "prettier/prettier" might represent some syntax for eslint rule?
that array can only have two elements?
Filipe Oliveira
@fily55
@platinumazure Thanks for the response. I have a rule working where I read the comments right off the bat using context.getSource().getComments(). Problem is that if the dev puts eslint-disable it never runs context.report. I think this won't work but it will sort 99% of inline configuration rules
Kevin Partington
@platinumazure
@shubhniksingh_twitter All ESLint rules (core or plugin) require either a severity number (0/1/2), severity string ("off"/"warn"/"error"), or an array with a severity as the first element and then rule options as later elements. The correct structure for those rule options depends on the rule.
John Vandenberg
@jayvdb
Would any eslint core contributors like to participate in Google Code-in as a mentor? http://coala.io is applying, with a number of our upstream linters (e.g. eslint) mentoring a few tasks each. All you need to do is nominate a few bugs that you believe a talented high school student could do in a 3-7 days, and nominate to mentor them if they run into trouble or need to ask questions, and commit to do code review with 36 hrs of them submitting their PR . coala GCI mentor signup form
shubhnik singh
@shubhniksingh_twitter
@platinumazure thanks :)
Jordan Harband
@ljharb
@platinumazure fwiw #9510 is a pretty important one for airbnb; whatever the path is, it'd be really good if we could ensure that we can get to a place soon where this pattern can be autofixed
Benjamin R Gibson
@brgibson
Hi all, I know this PR is less than 24 hrs old, but I was wondering when I should expect feedback: eslint/eslint#9506. No rush. I'm just excited :smile: #longtimeuserfirsttimecontributer #christmasmorning
Ilya Volodin
@ilyavolodin
@brgibson Thanks for PR. I left a few comments. I didn't verify correctness of the code (although it looks reasonable to me), but I think there are some extra thinking needed for this PR
Kai Cataldo
@kaicataldo
Thanks for contributing @brgibson!
Benjamin R Gibson
@brgibson
:thumbsup:
udbhavgattani
@udbhavgattani
Has anyone integrated Eslint with Eclipse ? Can you tell the best way to do this ,I also have custom rules which I want to add.
Teddy Katz
@not-an-aardvark
I haven't personally used ESLint with Eclipse, but there is a list of editor integrations here, including a few for Eclipse.
Teddy Katz
@not-an-aardvark
I'm thrilled to announce that eslintbot no longer spams "LGTM" on every PR!
Benjamin R Gibson
@brgibson
:clap: :grinning:
薛定谔的猫
@aladdin-add
🎉🎉🎉
Vuong Tran
@vuongtran
:)
Epaminaidos
@Epaminaidos
@platinumazure block-scoped-var does not work for me. If I have the same variable in two distinct blocks, it still generates an error:
if (true) {
if (true) { var j=0; }
if (true) { var j=0; }
This creates an error unfortunately
Cihan Bebek
@Keksike
Hey! I'm having problems with my eslint giving me no-undef errors for React class properties. I'm using eslint 3.19.0, eslint-plugin-react@7.4.0 & react-scripts@1.0.1
On my co-workers PC he doesn't get any eslint errors from those. How should I debug my problem?
Christophe Maillard
@sp00m
Hey! How can I force the use of parens around the condition of a ternary operator?
Could no-restricted-syntax be helpful somehow? I've been already quite surprised by its power (eslint/eslint#8677) ;)
Kevin Partington
@platinumazure
@Keksike Might be worth running ESLint with the --print-config option on your machine and that of your coworker; you might see a difference in eslint-plugin-react rules being applied. You could then run ESLint with the --debug option to see what config files are being loaded and used in the configuration resolution steps. Maybe you or your coworker has an extra config file in the mix.
@Epaminaidos What error are you seeing and what behavior are you expecting?
Adam Klepacz
@adamklepacz
hi guys, after instaling ESLINT using npm, I try to use
$ eslinst filename.js
but it gives me back an error "ESLint: 4.9.0.
ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons"
I've allready put " npm i eslint-plugin-html@latest --save-dev" and installed plugin
but still still doesn't work
what I'm doing wrong? I'm junior, don't yell at me :)
薛定谔的猫
@aladdin-add
$ ./node_modules/.bin/eslint filename.js
try this?
Adam Klepacz
@adamklepacz
no such as file or directory
i'm inside my project root folder
薛定谔的猫
@aladdin-add
$ ./node_modules/.bin/eslint .
"." means linting all the project! :smile:
Adam Klepacz
@adamklepacz
still gives me the same message
no such as file or directory
薛定谔的猫
@aladdin-add
how did you install eslint?
global?
Adam Klepacz
@adamklepacz
globally
yeah
薛定谔的猫
@aladdin-add
ESLint can be globally or locally installed. If you install ESLint globally, your plugins must also be installed globally; if you install ESLint locally, your plugins must also be installed locally.