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.

Dotfiles still being ignored with version 6.8.0

See original GitHub issue

Tell us about your environment

  • Node version: v13.7.0
  • npm version: v6.13.6
  • Local ESLint version: v6.8.0 (Currently used)
  • Global ESLint version: Not found

What parser (default, Babel-ESLint, etc.) are you using?

default

Please show your full configuration:

Configuration
const defaults = {
    "env": {
        "browser": true,
        "es6": true
    },
    "extends": "eslint:recommended",
    "globals": {
        "Atomics": "readonly",
        "SharedArrayBuffer": "readonly"
    },
    "parserOptions": {
        "ecmaVersion": 2018,
        "sourceType": "module"
    },
    "rules": {
    },
}

module.exports = {
    ...defaults,
    overrides: [{
        files: ['.my-dotfile.js'],
        ...defaults
    }]
};

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

Dot files are being ignored, even when explicitly set in the overrides section. See config.

yarn run eslint .my-dotfile.js # ignores file despite explicitly naming it
yarn run eslint .              # ingores file too despite being explicitly set in overrides section in config

What did you expect to happen?

The .my-dotfile.js file should have been linted

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

It did not lint the file

/home/ayzing/workspace/repro-eslint-dotfiles-not-working/.my-dotfile.js
  0:0  warning  File ignored by default.  Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override

✖ 1 problem (0 errors, 1 warning)

Are you willing to submit a pull request to fix this bug?

Not at this time. Here’s a sample repo to help with the debugging.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
kaicataldocommented, Feb 19, 2020

overrides still respects ignore patterns, so you’ll want to follow the suggestion given in the error message. Alternatively, you can use an .eslintignore file or by specifying ignorePatterns in your configuration.

Unrelated to this, but overrides are merged into the top-level config (the intention is to allow users to override the base config for specific files), so you don’t need to merge defaults into the overrides entry.

2reactions
thescientist13commented, Feb 20, 2020

Great, and good to know @kaicataldo ! And now also answers a very important question… who lints the linters? (spoilers: it’s also the linters 😄 )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating to v7.0.0 - ESLint - Pluggable JavaScript Linter
Default ignore patterns have changed​​ Up until now, ESLint has ignored the following files by default: Dotfiles ( . * ) node_modules in...
Read more >
Puppet release notes
Puppet agent --disable is ignored with cron puppet agent (splay). Puppet agent now checks the disabled lock file after sleeping due to splay....
Read more >
https://maps.london.gov.uk/gitea/gla-intelligence/...
yarn lockfile v1 "@babel/code-frame@7.0.0-beta.44": version "7.0.0-beta.44" ... babel-plugin-syntax-export-extensions@^6.8.0: version "6.13.0" resolved ...
Read more >
/yarn.lock | lodash@4.17.19 | Deno
A modern JavaScript utility library delivering modularity, performance, & extras.
Read more >
https://git.asonix.dog/asonix/mastodon/commit/ffab...
+# yarn lockfile v1 +"@kadira/react-split-pane@^1.4.0": + version "1.4.7" + ... + lodash "^4.2.0" + +babel-helper-call-delegate@^6.8.0: + version "6.8.0" + ...
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