question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configurations in upper folders are always ignored

See original GitHub issue

Tell us about your environment

  • ESLint Version: 4.16.0
  • eslint-plugin-vue Version: 4.2.0
  • Node Version: 6.8.1

Please show your full configuration:

Say, I have this setting: (modified from ESLint configuration cascading example)

your-project
├── .eslintrc.yaml // (A)
└── app
      ├── source.js    
      └─┬ vue_components
        ├── .eslintrc.yaml // (B)
        └─ foo.vue

And in (A), I set

  root: true
  rules:
    semi:
      - error
      - always

In (B):

    extends:
        - plugin:vue/essential

What did you do? Please include the actual source code causing the issue.

In foo.vue:

<script>
console.log(hi)    // no semi
</script>

What did you expect to happen?

ESLint should report error about “Missing semicolon”

What actually happened? Please include the actual, raw output from ESLint.

ESLint considered everything fine and output nothing.


I traced the flow of ESLint, and found that the root: true in config/base.js which comes from update-lib-config.js resulting the very config file including “pulgin: vue” would be considered root and thus making ESLint ignore any config file in upper directories. In my example, the config of semi: always is ignored.

Because we are adopting Vue gragually, we want this kind of configuration. A root: false in (B) could work, but I think root: true should be used in the project config file, since providing it from a ESLint plugin only causes confusion. (Maybe ESLint should block this?)

I did search through the issues and did not find reports about this, but if I just missed it, please accept my apology, and close this issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mysticateacommented, Jan 25, 2018

Thank you for this issue.

Sounds good to me. We have root:true in the base config since the first time, but it seems confusing. However, the change of configs needs semver-major in our policy, so we consider it on the next major release.

For now, please use root: false.

0reactions
brianjmillercommented, Mar 21, 2018

+1, just ran into this based on a setup from the webpack vue template. Passing --debug to eslint makes it very easy to see which configuration files are being considered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why git keeps ignoring files within certain directory despite I ...
For example, under python_scripts folder all .py files are being ignored. Funny .yaml files are not ignored. I know there are several questions ......
Read more >
.htaccess in upper directories being ignored - Server Fault
When accesing bookmatic.net, the .htaccess file in /htc is running good, but the one in /html is being ignored. Can anyone help? bookmatic.net ......
Read more >
.gitignore File – How to Ignore Files and Folders in Git
Inside . gitignore , you can tell Git to ignore only a single file or a single folder by mentioning the name or...
Read more >
TortoiseSVN's Settings
Ignore files or directories by typing in the names or extensions. ... has the svn:needs-lock property set, Get Lock will always appear at...
Read more >
How-to: ignore cargo config file in parent folder
That would mean your config files are no longer merged. With any common configuration put in the top-level directory. 2ndTaleStudio ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found