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.

Ignore negation doesn't seem to work

See original GitHub issue

This could be not a bug, but everything I find about ignores in eslint leads me to believe this should work. It definitely works in the git-version (i.e using .gitignore, git status behaves as I’d expect eslint to).

Tell us about your environment

Environment Info:

Node version: v14.4.0 npm version: v6.14.7 Local ESLint version: v7.6.0 (Currently used) Global ESLint version: Not found

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

Please show your full configuration:

Configuration
module.exports = {
  env: { es2017: true },
  rules: {
    semi: 'error'
  }
};

.eslintignore:

public/
!public/src

This occurs both with .eslintignore & ignorePatterns.

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

const x = () => {}

The above is the contents of all three js files in the project, structured like so:

.
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── file1.js
├── package-lock.json
├── package.json
└── public
    ├── file2.js
    └── src
        └── file3.js

2 directories, 8 files
npm run lint # which is: "eslint ."
npx run eslint .
npx run eslint '**/*.js'

# etc

(I’ve thrown in a number of ways I’ve ran eslint, just to be sure it wasn’t me calling it wrong)

Here’s a reproduction repo.

What did you expect to happen? ESLint should report on file1.js & public/src/file3.js

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

> nrun.js lint
> eslint .

/c/Users/G-Rath/workspace/eslint-ignore-reproduction/file1.js
  1:19  error  Missing semicolon  semi

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

output with `--debug`
2020-08-12T06:11:16.835Z eslint:cli CLI args: [ '.', '--debug' ]
2020-08-12T06:11:16.836Z eslint:cli Running on files
2020-08-12T06:11:16.846Z eslint:config-array-factory Loading .eslintignore file: /c/Users/G-Rath/workspace/te2/.eslintignore
2020-08-12T06:11:16.847Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/c/Users/G-Rath/workspace/te2', loose: false } ]
2020-08-12T06:11:16.849Z eslint:ignore-pattern   processed: { basePath: '/c/Users/G-Rath/workspace/te2', patterns: [ '/**/node_modules/*' ] }
2020-08-12T06:11:16.849Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/c/Users/G-Rath/workspace/te2', loose: false } ]
2020-08-12T06:11:16.849Z eslint:ignore-pattern   processed: { basePath: '/c/Users/G-Rath/workspace/te2', patterns: [ '/**/node_modules/*' ] }
2020-08-12T06:11:16.850Z eslint:file-enumerator Start to iterate files: [ '.' ]
2020-08-12T06:11:16.850Z eslint:file-enumerator Directory: /c/Users/G-Rath/workspace/te2
2020-08-12T06:11:16.850Z eslint:file-enumerator Enter the directory: /c/Users/G-Rath/workspace/te2
2020-08-12T06:11:16.851Z eslint:cascading-config-array-factory Load config files for /c/Users/G-Rath/workspace/te2.
2020-08-12T06:11:16.851Z eslint:cascading-config-array-factory No cache found: /c/Users/G-Rath/workspace/te2.
2020-08-12T06:11:16.851Z eslint:config-array-factory Loading JS config file: /c/Users/G-Rath/workspace/te2/.eslintrc.js
2020-08-12T06:11:16.852Z eslint:config-array-factory Config file found: /c/Users/G-Rath/workspace/te2/.eslintrc.js
2020-08-12T06:11:16.853Z eslint:cascading-config-array-factory No cache found: /c/Users/G-Rath/workspace.
2020-08-12T06:11:16.853Z eslint:config-array-factory Config file not found on /c/Users/G-Rath/workspace
2020-08-12T06:11:16.853Z eslint:cascading-config-array-factory No cache found: /c/Users/G-Rath.
2020-08-12T06:11:16.853Z eslint:config-array-factory Config file not found on /c/Users/G-Rath
2020-08-12T06:11:16.853Z eslint:cascading-config-array-factory No cache found: /c/Users.
2020-08-12T06:11:16.854Z eslint:config-array-factory Config file not found on /c/Users
2020-08-12T06:11:16.854Z eslint:cascading-config-array-factory No cache found: /c.
2020-08-12T06:11:16.854Z eslint:config-array-factory Config file not found on /c
2020-08-12T06:11:16.854Z eslint:cascading-config-array-factory No cache found: /.
2020-08-12T06:11:16.854Z eslint:config-array-factory Config file not found on /
2020-08-12T06:11:16.855Z eslint:rules Loading rule 'semi' (remaining=281)
2020-08-12T06:11:16.865Z eslint:cascading-config-array-factory Configuration was determined: ConfigArray(3) [ { type: 'config', name: 'DefaultIgnorePattern', filePath: '', criteria: null, env: undefined, globals: undefined, ignorePattern: IgnorePattern { patterns: [Array], basePath: '/c/Users/G-Rath/workspace/te2', loose: false }, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined }, { type: 'config', name: '.eslintrc.js', filePath: '/c/Users/G-Rath/workspace/te2/.eslintrc.js', criteria: null, env: { es2017: true }, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: { semi: 'error' }, settings: undefined }, { type: 'ignore', name: '.eslintignore', filePath: '/c/Users/G-Rath/workspace/te2/.eslintignore', criteria: null, env: undefined, globals: undefined, ignorePattern: IgnorePattern { patterns: [Array], basePath: '/c/Users/G-Rath/workspace/te2', loose: true }, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined } ] on /c/Users/G-Rath/workspace/te2
2020-08-12T06:11:16.866Z eslint:file-enumerator Didn't match: .eslintignore
2020-08-12T06:11:16.866Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/c/Users/G-Rath/workspace/te2', loose: false }, IgnorePattern { patterns: [ 'public/', '!public/src' ], basePath: '/c/Users/G-Rath/workspace/te2', loose: true } ]
2020-08-12T06:11:16.866Z eslint:ignore-pattern   processed: { basePath: '/c/Users/G-Rath/workspace/te2', patterns: [ '/**/node_modules/*', 'public/', '!public/src' ] }
2020-08-12T06:11:16.867Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/.eslintrc.js',
  dot: false,
  relativePath: '.eslintrc.js',
  result: false
}
2020-08-12T06:11:16.867Z eslint:file-enumerator Yield: .eslintrc.js
2020-08-12T06:11:16.867Z eslint:cascading-config-array-factory Load config files for /c/Users/G-Rath/workspace/te2.
2020-08-12T06:11:16.867Z eslint:cascading-config-array-factory Cache hit: /c/Users/G-Rath/workspace/te2.
2020-08-12T06:11:16.867Z eslint:cli-engine Lint /c/Users/G-Rath/workspace/te2/.eslintrc.js
2020-08-12T06:11:16.867Z eslint:linter Linting code for /c/Users/G-Rath/workspace/te2/.eslintrc.js (pass 1)
2020-08-12T06:11:16.867Z eslint:linter Verify
2020-08-12T06:11:16.868Z eslint:linter With ConfigArray: /c/Users/G-Rath/workspace/te2/.eslintrc.js
2020-08-12T06:11:16.882Z eslint:linter Generating fixed text for /c/Users/G-Rath/workspace/te2/.eslintrc.js (pass 1)
2020-08-12T06:11:16.882Z eslint:source-code-fixer Applying fixes
2020-08-12T06:11:16.882Z eslint:source-code-fixer shouldFix parameter was false, not attempting fixes
2020-08-12T06:11:16.883Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/.git/',
  dot: false,
  relativePath: '.git/',
  result: true
}
2020-08-12T06:11:16.883Z eslint:file-enumerator Didn't match: .gitignore
2020-08-12T06:11:16.883Z eslint:file-enumerator Didn't match: 1
2020-08-12T06:11:16.883Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/file1.js',
  dot: false,
  relativePath: 'file1.js',
  result: false
}
2020-08-12T06:11:16.883Z eslint:file-enumerator Yield: file1.js
2020-08-12T06:11:16.883Z eslint:cascading-config-array-factory Load config files for /c/Users/G-Rath/workspace/te2.
2020-08-12T06:11:16.883Z eslint:cascading-config-array-factory Cache hit: /c/Users/G-Rath/workspace/te2.
2020-08-12T06:11:16.883Z eslint:cli-engine Lint /c/Users/G-Rath/workspace/te2/file1.js
2020-08-12T06:11:16.883Z eslint:linter Linting code for /c/Users/G-Rath/workspace/te2/file1.js (pass 1)
2020-08-12T06:11:16.883Z eslint:linter Verify
2020-08-12T06:11:16.883Z eslint:linter With ConfigArray: /c/Users/G-Rath/workspace/te2/file1.js
2020-08-12T06:11:16.887Z eslint:linter Generating fixed text for /c/Users/G-Rath/workspace/te2/file1.js (pass 1)
2020-08-12T06:11:16.887Z eslint:source-code-fixer Applying fixes
2020-08-12T06:11:16.887Z eslint:source-code-fixer shouldFix parameter was false, not attempting fixes
2020-08-12T06:11:16.887Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/',
  dot: false,
  relativePath: 'node_modules/',
  result: false
}
2020-08-12T06:11:16.887Z eslint:file-enumerator Enter the directory: /c/Users/G-Rath/workspace/te2/node_modules
2020-08-12T06:11:16.887Z eslint:cascading-config-array-factory Load config files for /c/Users/G-Rath/workspace/te2/node_modules.
2020-08-12T06:11:16.887Z eslint:cascading-config-array-factory No cache found: /c/Users/G-Rath/workspace/te2/node_modules.
2020-08-12T06:11:16.888Z eslint:config-array-factory Config file not found on /c/Users/G-Rath/workspace/te2/node_modules
2020-08-12T06:11:16.888Z eslint:cascading-config-array-factory Cache hit: /c/Users/G-Rath/workspace/te2.
2020-08-12T06:11:16.888Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/.bin/',
  dot: false,
  relativePath: 'node_modules/.bin/',
  result: true
}
2020-08-12T06:11:16.888Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/@babel/',
  dot: false,
  relativePath: 'node_modules/@babel/',
  result: true
}
2020-08-12T06:11:16.888Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/@types/',
  dot: false,
  relativePath: 'node_modules/@types/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/acorn/',
  dot: false,
  relativePath: 'node_modules/acorn/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/acorn-jsx/',
  dot: false,
  relativePath: 'node_modules/acorn-jsx/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/ajv/',
  dot: false,
  relativePath: 'node_modules/ajv/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/ansi-colors/',
  dot: false,
  relativePath: 'node_modules/ansi-colors/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/ansi-regex/',
  dot: false,
  relativePath: 'node_modules/ansi-regex/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/ansi-styles/',
  dot: false,
  relativePath: 'node_modules/ansi-styles/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/argparse/',
  dot: false,
  relativePath: 'node_modules/argparse/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/astral-regex/',
  dot: false,
  relativePath: 'node_modules/astral-regex/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/balanced-match/',
  dot: false,
  relativePath: 'node_modules/balanced-match/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/brace-expansion/',
  dot: false,
  relativePath: 'node_modules/brace-expansion/',
  result: true
}
2020-08-12T06:11:16.889Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/callsites/',
  dot: false,
  relativePath: 'node_modules/callsites/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/chalk/',
  dot: false,
  relativePath: 'node_modules/chalk/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/color-convert/',
  dot: false,
  relativePath: 'node_modules/color-convert/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/color-name/',
  dot: false,
  relativePath: 'node_modules/color-name/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/concat-map/',
  dot: false,
  relativePath: 'node_modules/concat-map/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/cross-spawn/',
  dot: false,
  relativePath: 'node_modules/cross-spawn/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/debug/',
  dot: false,
  relativePath: 'node_modules/debug/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/deep-is/',
  dot: false,
  relativePath: 'node_modules/deep-is/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/doctrine/',
  dot: false,
  relativePath: 'node_modules/doctrine/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/emoji-regex/',
  dot: false,
  relativePath: 'node_modules/emoji-regex/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/enquirer/',
  dot: false,
  relativePath: 'node_modules/enquirer/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/escape-string-regexp/',
  dot: false,
  relativePath: 'node_modules/escape-string-regexp/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/eslint/',
  dot: false,
  relativePath: 'node_modules/eslint/',
  result: true
}
2020-08-12T06:11:16.890Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/eslint-scope/',
  dot: false,
  relativePath: 'node_modules/eslint-scope/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/eslint-utils/',
  dot: false,
  relativePath: 'node_modules/eslint-utils/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/eslint-visitor-keys/',
  dot: false,
  relativePath: 'node_modules/eslint-visitor-keys/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/espree/',
  dot: false,
  relativePath: 'node_modules/espree/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/esprima/',
  dot: false,
  relativePath: 'node_modules/esprima/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/esquery/',
  dot: false,
  relativePath: 'node_modules/esquery/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/esrecurse/',
  dot: false,
  relativePath: 'node_modules/esrecurse/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/estraverse/',
  dot: false,
  relativePath: 'node_modules/estraverse/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/esutils/',
  dot: false,
  relativePath: 'node_modules/esutils/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/fast-deep-equal/',
  dot: false,
  relativePath: 'node_modules/fast-deep-equal/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/fast-json-stable-stringify/',
  dot: false,
  relativePath: 'node_modules/fast-json-stable-stringify/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/fast-levenshtein/',
  dot: false,
  relativePath: 'node_modules/fast-levenshtein/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/file-entry-cache/',
  dot: false,
  relativePath: 'node_modules/file-entry-cache/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/flat-cache/',
  dot: false,
  relativePath: 'node_modules/flat-cache/',
  result: true
}
2020-08-12T06:11:16.891Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/flatted/',
  dot: false,
  relativePath: 'node_modules/flatted/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/fs.realpath/',
  dot: false,
  relativePath: 'node_modules/fs.realpath/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/functional-red-black-tree/',
  dot: false,
  relativePath: 'node_modules/functional-red-black-tree/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/glob/',
  dot: false,
  relativePath: 'node_modules/glob/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/glob-parent/',
  dot: false,
  relativePath: 'node_modules/glob-parent/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/globals/',
  dot: false,
  relativePath: 'node_modules/globals/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/has-flag/',
  dot: false,
  relativePath: 'node_modules/has-flag/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/ignore/',
  dot: false,
  relativePath: 'node_modules/ignore/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/import-fresh/',
  dot: false,
  relativePath: 'node_modules/import-fresh/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/imurmurhash/',
  dot: false,
  relativePath: 'node_modules/imurmurhash/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/inflight/',
  dot: false,
  relativePath: 'node_modules/inflight/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/inherits/',
  dot: false,
  relativePath: 'node_modules/inherits/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/is-extglob/',
  dot: false,
  relativePath: 'node_modules/is-extglob/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/is-fullwidth-code-point/',
  dot: false,
  relativePath: 'node_modules/is-fullwidth-code-point/',
  result: true
}
2020-08-12T06:11:16.892Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/is-glob/',
  dot: false,
  relativePath: 'node_modules/is-glob/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/isexe/',
  dot: false,
  relativePath: 'node_modules/isexe/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/js-tokens/',
  dot: false,
  relativePath: 'node_modules/js-tokens/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/js-yaml/',
  dot: false,
  relativePath: 'node_modules/js-yaml/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/json-schema-traverse/',
  dot: false,
  relativePath: 'node_modules/json-schema-traverse/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/json-stable-stringify-without-jsonify/',
  dot: false,
  relativePath: 'node_modules/json-stable-stringify-without-jsonify/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/levn/',
  dot: false,
  relativePath: 'node_modules/levn/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/lodash/',
  dot: false,
  relativePath: 'node_modules/lodash/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/minimatch/',
  dot: false,
  relativePath: 'node_modules/minimatch/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/minimist/',
  dot: false,
  relativePath: 'node_modules/minimist/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/mkdirp/',
  dot: false,
  relativePath: 'node_modules/mkdirp/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/ms/',
  dot: false,
  relativePath: 'node_modules/ms/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/natural-compare/',
  dot: false,
  relativePath: 'node_modules/natural-compare/',
  result: true
}
2020-08-12T06:11:16.893Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/once/',
  dot: false,
  relativePath: 'node_modules/once/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/optionator/',
  dot: false,
  relativePath: 'node_modules/optionator/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/parent-module/',
  dot: false,
  relativePath: 'node_modules/parent-module/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/path-is-absolute/',
  dot: false,
  relativePath: 'node_modules/path-is-absolute/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/path-key/',
  dot: false,
  relativePath: 'node_modules/path-key/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/prelude-ls/',
  dot: false,
  relativePath: 'node_modules/prelude-ls/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/progress/',
  dot: false,
  relativePath: 'node_modules/progress/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/punycode/',
  dot: false,
  relativePath: 'node_modules/punycode/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/regexpp/',
  dot: false,
  relativePath: 'node_modules/regexpp/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/resolve-from/',
  dot: false,
  relativePath: 'node_modules/resolve-from/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/rimraf/',
  dot: false,
  relativePath: 'node_modules/rimraf/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/semver/',
  dot: false,
  relativePath: 'node_modules/semver/',
  result: true
}
2020-08-12T06:11:16.894Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/shebang-command/',
  dot: false,
  relativePath: 'node_modules/shebang-command/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/shebang-regex/',
  dot: false,
  relativePath: 'node_modules/shebang-regex/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/slice-ansi/',
  dot: false,
  relativePath: 'node_modules/slice-ansi/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/sprintf-js/',
  dot: false,
  relativePath: 'node_modules/sprintf-js/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/string-width/',
  dot: false,
  relativePath: 'node_modules/string-width/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/strip-ansi/',
  dot: false,
  relativePath: 'node_modules/strip-ansi/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/strip-json-comments/',
  dot: false,
  relativePath: 'node_modules/strip-json-comments/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/supports-color/',
  dot: false,
  relativePath: 'node_modules/supports-color/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/table/',
  dot: false,
  relativePath: 'node_modules/table/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/text-table/',
  dot: false,
  relativePath: 'node_modules/text-table/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/type-check/',
  dot: false,
  relativePath: 'node_modules/type-check/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/type-fest/',
  dot: false,
  relativePath: 'node_modules/type-fest/',
  result: true
}
2020-08-12T06:11:16.895Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/uri-js/',
  dot: false,
  relativePath: 'node_modules/uri-js/',
  result: true
}
2020-08-12T06:11:16.896Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/v8-compile-cache/',
  dot: false,
  relativePath: 'node_modules/v8-compile-cache/',
  result: true
}
2020-08-12T06:11:16.896Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/which/',
  dot: false,
  relativePath: 'node_modules/which/',
  result: true
}
2020-08-12T06:11:16.896Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/word-wrap/',
  dot: false,
  relativePath: 'node_modules/word-wrap/',
  result: true
}
2020-08-12T06:11:16.896Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/wrappy/',
  dot: false,
  relativePath: 'node_modules/wrappy/',
  result: true
}
2020-08-12T06:11:16.896Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/node_modules/write/',
  dot: false,
  relativePath: 'node_modules/write/',
  result: true
}
2020-08-12T06:11:16.896Z eslint:file-enumerator Leave the directory: /c/Users/G-Rath/workspace/te2/node_modules
2020-08-12T06:11:16.896Z eslint:file-enumerator Didn't match: outout
2020-08-12T06:11:16.896Z eslint:file-enumerator Didn't match: package-lock.json
2020-08-12T06:11:16.896Z eslint:file-enumerator Didn't match: package.json
2020-08-12T06:11:16.896Z eslint:ignore-pattern Check {
  filePath: '/c/Users/G-Rath/workspace/te2/public/',
  dot: false,
  relativePath: 'public/',
  result: true
}
2020-08-12T06:11:16.896Z eslint:file-enumerator Leave the directory: /c/Users/G-Rath/workspace/te2
2020-08-12T06:11:16.896Z eslint:file-enumerator Complete iterating files: ["."]
2020-08-12T06:11:16.896Z eslint:cli-engine Linting complete in: 47ms

Are you willing to submit a pull request to fix this bug? I’m happy to help.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
mdjermanoviccommented, Aug 12, 2020

I think this is correct behavior per the gitignore specification:

It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.

This would work:

public/*
!public/src
1reaction
G-Rathcommented, Aug 12, 2020

Harzar! I think you’ve hit the one combo I must not have tried.

I figured it’d be a matter of syntax rather than an actual bug, but felt worth asking so its on an issue somewhere. I’ll apply this to our config and let you know if it continues to work 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Stop Being Negative: 7 Ways to Shift a Negative Outlook
2. Acknowledge them ... Think of your negative thoughts as an untrained, jumping, barking dog. You can try and ignore them, tell them...
Read more >
How to Deal With Negative People Who Just Aren't Going Away
1. Don't buy into their negativity. ... Don't allow yourself to become infected with toxic negativity. Do not engage in a difficult person's ......
Read more >
Should You Address Or Ignore Negative Feedback? - Forbes
"When feedback takes a negative turn, determining whether or not you should ignore or respond can be a tough and even emotional decision,"...
Read more >
13 Ways We Justify, Rationalize, or Ignore Negative Feedback
Most of us dislike negative feedback so much that we've even changed the name — it's not negative, it's constructive.
Read more >
7 Negative People You Need to Ignore
Letting go of negative people doesn't mean you hate them, or that you wish them harm; it just means you care about your...
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