Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when saving my .tsx files: Failed to load plugin 'jsx-a11y' declared in 'CLIOptions' #106

Closed
AxelBriche opened this issue Oct 25, 2022 · 1 comment

Comments

@AxelBriche
Copy link

AxelBriche commented Oct 25, 2022

Describe the bug
Error when saving my .tsx files:

Failed to load plugin 'jsx-a11y' declared in 'CLIOptions': The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ''

.eslintrc.js

module.exports = {
  extends: ["@remix-run/eslint-config", "@remix-run/eslint-config/node"],
  parser: "@typescript-eslint/parser",
};

package.json

{
  "private": true,
  "sideEffects": false,
  "scripts": {
    "build": "remix build",
    "dev": "concurrently \"npm run dev:css\" \"remix dev\"",
    "start": "remix-serve build",
    "dev:css": "postcss styles --base styles --dir app/styles -w",
    "build:css": "postcss styles --base styles --dir app/styles --env production"
  },
  "dependencies": {
    "@prisma/client": "^4.5.0",
    "@remix-run/node": "^1.7.3",
    "@remix-run/react": "^1.7.3",
    "@remix-run/serve": "^1.7.3",
    "@unocss/reset": "^0.45.30",
    "bcryptjs": "^2.4.3",
    "postcss-preset-env": "^7.8.2",
    "react": "^17.0.2",
    "react-dom": "^17.0.2"
  },
  "devDependencies": {
    "@remix-run/dev": "^1.7.3",
    "@remix-run/eslint-config": "^1.7.3",
    "@types/bcryptjs": "^2.4.2",
    "@types/react": "^17.0.39",
    "@types/react-dom": "^17.0.13",
    "@typescript-eslint/parser": "^5.41.0",
    "autoprefixer": "^10.4.12",
    "concurrently": "^7.5.0",
    "esbuild-register": "^3.3.2",
    "eslint": "^8.26.0",
    "eslint-plugin-react": "^7.31.10",
    "postcss": "^8.4.18",
    "postcss-cli": "^10.0.0",
    "prettier": "^2.7.1",
    "prisma": "^4.5.0",
    "typescript": "^4.8.4"
  },
  "engines": {
    "node": ">=14"
  },
  "prisma": {
    "seed": "node --require esbuild-register prisma/seed.ts"
  }
}
@idahogurl
Copy link
Owner

@AxelBriche This is an issue with @rushstack/eslint-patch which @remix-run/eslint-config uses (https://github.com/remix-run/remix/blob/3832d457b34d7a62633bf86a2606971263e710cb/packages/remix-eslint-config/package.json#L29) not with the extension or prettier-eslint. Other users have had the same issue with the @next/eslint-plugin-next which uses @rushstack/eslint-patch. I've included some links for some suggestions on how to get around it.

#72 (comment)
#72 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants