Comments (4)
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 .eslintrc.js
to eslint.config.js
(without changing anything inside it), I received the error:
Oops! Something went wrong! :(
ESLint: 9.0.0
You are linting "{src,apps,libs,test}/**/*.ts", but all of the files matching the glob pattern "{src,apps,libs,test}/**/*.ts" are ignored.
If you don't want to lint these files, remove the pattern "{src,apps,libs,test}/**/*.ts" from the list of arguments passed to ESLint.
If you do want to lint these files, try the following solutions:
* Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored.
* Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument.
Here is my eslint.config.js
:
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,
},
},
},
};
from eslint.
Link to Minimal Reproducible Example
I'm getting 404 on this link, perhaps the repo is private. Can you provide another repo where we could reproduce this?
from eslint.
Link to Minimal Reproducible Example
I'm getting 404 on this link, perhaps the repo is private. Can you provide another repo where we could reproduce this?
Hey so sorry I posted this just before I left for vacation. I can create a reproduction mid May when I am back at the studio.
Glad to see another user has had the same issue though.
from eslint.
@elliottmangham @paulocoghi neither of your examples are valid eslint.config.js
files. Please see the migration guide for help in converting your config file.
@paulocoghi please create a StackBlitz or GitHub repo with a minimal reproduction so we can take a look.
from eslint.
Related Issues (20)
- Bug: defining a global named `__defineSetter__` doesn't work HOT 1
- Init wizard not generating flat config HOT 8
- Change Request: Some tweaks to getFunctionHeadLoc HOT 3
- Bug: flat configs are processing ignored directories and applying rules that were scoped to other directories HOT 1
- Bug: ESLint never stops when analyzing linter issues in the project HOT 17
- Docs: `no-unreachable` is not necessarily handled by TypeScript HOT 1
- Bug: eslint v8 with flat config and airbnb-base throws cryptic error
- Docs: custom rule tutorial doesn't work with v9 HOT 1
- Scheduled release for May 3rd, 2024 HOT 2
- Change Request: Make it easier to inherit flat configs from the repo root HOT 12
- This method cannot be used with flat config. Add your entries directly into the config array. HOT 1
- Bug: (Config (unnamed): Unexpected key "baseDirectory" found.) HOT 1
- 📈 Tracking: ESLint v9 support HOT 5
- Change Request: use env npm_execpath in alias init HOT 1
- Rule Change: stop fixing prefer-const HOT 2
- Bug: using `--ext` throws an invalid option error HOT 4
- Change Request: (add eslint warnings exit code) HOT 13
- FlatCompat not working anymore with eslint v9 HOT 5
- Bug: (Error when opening configuration files, like eslint.config.mjs and.prettierrc) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint.