Replies: 8 comments 2 replies
-
What does your eslint configuration look like? the "Link to Minimal Reproducible Example" seems not able to repro it. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem, When i use "eslint": "^7.32.0" in package.json everything is good. But when i use eslint": "^8.0.1 i have the same problem. Any Ignore rules i don't use. It happens when i use script - "lint": "eslint src/**/*.{tsx,ts}" yarn run v1.22.19 Oops! Something went wrong! :( ESLint: 8.57.0 You are linting "src//*.{tsx,ts}", but all of the files matching the glob pattern "src//*.{tsx,ts}" are ignored. If you don't want to lint these files, remove the pattern "src/**/*.{tsx,ts}" from the list of arguments passed to ESLint. If you do want to lint these files, try the following solutions:
error Command failed with exit code 2. |
Beta Was this translation helpful? Give feedback.
-
I'm having the same bug, or at least a similar one. After updating from ESLint 8.57.0 to 9.0.0 and moving
Here is my const isFixMode = process.argv.includes("--fix");
module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"xo",
"xo-space",
"xo-typescript",
"prettier",
"plugin:import/typescript",
"plugin:unicorn/recommended",
"plugin:prettier/recommended",
],
ignorePatterns: ["**/dist/*", "**/node_modules/*"],
overrides: [
{
plugins: ["jest"],
files: [
"test/**/*.ts",
"tests/**/*.ts",
"**/*.spec.ts",
],
rules: {
"@typescript-eslint/no-unsafe-assignment": "off",
"max-nested-callbacks": "off",
"jest/no-focused-tests": "error",
...(isFixMode && {
"jest/no-focused-tests": "warn",
}),
},
},
],
parserOptions: {
ecmaVersion: 2021,
sourceType: "module",
},
env: {
commonjs: true,
es6: true,
node: true,
jest: true,
},
plugins: [
"@typescript-eslint",
"import",
"unused-imports",
"unicorn",
"prettier",
],
rules: {
"prettier/prettier": ["error"],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"no-console": "off",
"@typescript-eslint/ban-types": "off",
"comma-dangle": ["error", "always-multiline"],
"unicorn/no-new-array": "off",
"unicorn/no-reduce": "off",
"unicorn/no-array-reduce": "off",
"unicorn/prevent-abbreviations": [
"error",
{
replacements: {
props: false,
args: false,
params: false,
env: false,
},
},
],
"import/prefer-default-export": "off",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "error",
"import/order": [
"error",
{
"newlines-between": "always",
alphabetize: { order: "asc" },
groups: ["builtin", "external", "internal", "parent", "sibling"],
},
],
"unused-imports/no-unused-imports-ts": "error",
"unused-imports/no-unused-vars-ts": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/naming-convention": [
"error",
{
selector: ["variable"],
modifiers: ["const"],
format: ["strictCamelCase", "StrictPascalCase", "UPPER_CASE"],
leadingUnderscore: "allow",
},
],
"new-cap": "off",
},
settings: {
"import/ignore": ["node_modules"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
},
},
}; |
Beta Was this translation helpful? Give feedback.
-
Just hit this as well. Here's a minimal reproduction: https://github.com/quellen-sol/eslint-bug-repro Using this in WSL2 Ubuntu with node version |
Beta Was this translation helpful? Give feedback.
-
I have the same issue on eslint v9.2.0. I don't have any eslintignore files or
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Same issue for me... |
Beta Was this translation helpful? Give feedback.
-
I was experiencing a similar error, but I was able to fix it by setting the environment variable |
Beta Was this translation helpful? Give feedback.
-
Environment
Node version: v20.12.1
npm version: 10.5.0
Local ESLint version: v8.57.0
Operating System: Debian
What parser are you using?
@typescript-eslint/parser
What did you do?
Way to reproduce
Create a file into
src/data/get_user/index.ts
with a linter error.Try run the command bellow
What did you expect to happen?
A expect the file will be read and found typescript errors.
What actually happened?
After run no error will be found because the file was not found.
Link to Minimal Reproducible Example
https://eslint.org/play/#eyJ0ZXh0IjoiLyogZXNsaW50IHF1b3RlczogW1wiZXJyb3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cnJvciJdLCJuby11bnVzZWQtcHJpdmF0ZS1jbGFzcy1tZW1iZXJzIjpbImVycm9yIl0sIm5vLXVudXNlZC12YXJzIjpbImVycm9yIl0sIm5vLXVzZWxlc3MtYmFja3JlZmVyZW5jZSI6WyJlcnJvciJdLCJuby11c2VsZXNzLWNhdGNoIjpbImVycm9yIl0sIm5vLXVzZWxlc3MtZXNjYXBlIjpbImVycm9yIl0sIm5vLXdpdGgiOlsiZXJyb3IiXSwicmVxdWlyZS15aWVsZCI6WyJlcnJvciJdLCJ1c2UtaXNuYW4iOlsiZXJyb3IiXSwidmFsaWQtdHlwZW9mIjpbImVycm9yIl19LCJsYW5ndWFnZU9wdGlvbnMiOnsicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9fX19fQ==
Participation
Additional comments
No response
Beta Was this translation helpful? Give feedback.
All reactions