Repository navigation
tools: question about some ESLint config options #12566
Copy link
Copy link
Closed
Labels
questionIssues asking questions about Node.js.Issues asking questions about Node.js.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Description
Activity
- addedquestionIssues asking questions about Node.js.Issues asking questions about Node.js.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
on Apr 21, 2017 2.makes sense to me.@gibfahn I think it can even prevent some murky bugs: if somebody forgetfully leaves some .eslintrc config in a parent directory above node repo directory, some node rules can be overwritten.
Reacted by Gibson Fahnestock- there's two issues that come with that option:
- eslint complains about unneccessary
'use strict';statements - eslint also complains about
returnin the top scope
why do you want to enable it? We don't have any module files yet, do we?
- sounds like a good addition.
Reacted by Vse Mozhe Buty and Teddy Katz- Oh, it seems I've misunderstood the option. It means ES6 modules, right?
- should it be:
root: true
at the top of the main
.eslintrc.yaml?- yes, it means import/export syntax
- yeah
Reacted by Vse Mozhe Buty and Teddy KatzIs it worth to set the option
parserOptions.sourceTypeasmodulein thelib/.eslintrc.yaml?No. That would be incorrect as those rules are for ES Modules, e.g. no top-level
returnas silverwind mentioned.Reacted by Vse Mozhe Buty and Teddy Katz- added a commit that references this issue
on Apr 24, 2017 - added a commit that references this issue
on May 16, 2017 - added a commit that references this issue
on May 18, 2017 - added a commit that references this issue
on Jul 19, 2017
Metadata
Metadata
Assignees
Labels
questionIssues asking questions about Node.js.Issues asking questions about Node.js.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Is it worth to set the option
parserOptions.sourceTypeasmodulein thelib/.eslintrc.yaml? What are pros / cons / breaking changes?Why don't we use the option
rootastruein the main.eslintrc.yaml?Would it spare the linter some fs churn / time?
cc @not-an-aardvark, @silverwind, @Trott