eslint: Bug: ESLint never stops when analyzing linter issues in the project
Environment
Node version: 20.12.2 npm version: PNPM 8.15.7 Local ESLint version: 9.1.0 Global ESLint version: N/A Operating System: Windows
What parser are you using?
Default (Espree)
What did you do?
Configuration
// Paste your configuration here
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';
import pluginJs from '@eslint/js';
import globals from 'globals';
// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: pluginJs.configs.recommended
});
export default [
{
ignores: ['public/'],
languageOptions: { globals: globals.node },
rules: {
'linebreak-style': ['error', 'unix'],
'no-console': 'error',
'no-undef': 'error',
'no-unused-vars': 'error',
'no-var': 'error',
'prefer-const': 'error',
'prefer-destructuring': 'error',
'prefer-template': 'error',
quotes: ['error', 'single'],
semi: ['error', 'always']
}
},
...compat.extends('plugin:prettier/recommended')
];
I ran the following command to analyze linter issues with my Node.js ES modules (mjs), and ESLint does not stop the execution.
<!-- Paste your code here -->
eslint .
What did you expect to happen?
I expected ESLint to stop its execution automatically and show me the issues with my source code.
What actually happened?
ESLint does not stop its execution automatically.
Link to Minimal Reproducible Example
https://github.com/OpenToonix/OpenToonix-Assets-Gateway
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
About this issue
- Original URL
- State: closed
- Created 2 months ago
- Comments: 17 (9 by maintainers)
@fasttime Jum, I will have to try to run the command from the CLI later today, and I will try the suggested things by @aladdin-add and @mdjermanovic, too.
I presume you want to ignore the dir totally, in your eslint.config.js file, if an ignores key is used without any other keys in the configuration object, then the patterns act as global ignores. see the docs: https://eslint.org/docs/latest/use/configure/ignore#ignoring-files
if it does not work for you, please run
eslint --debug .
to see what’s happening.