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

MODULE_NOT_FOUND error while using prettier plugins #613

Open
khavinshankar opened this issue Apr 7, 2024 · 0 comments
Open

MODULE_NOT_FOUND error while using prettier plugins #613

khavinshankar opened this issue Apr 7, 2024 · 0 comments

Comments

@khavinshankar
Copy link

Description

We've encountered an issue where Prettier plugins integrated with ESLint are not recognized during Code Climate's analysis process. While these plugins work seamlessly in our local development environments, they seem to be overlooked by Code Climate, leading to discrepancies between local linting results and those reported by Code Climate.

Actual Behavior

During Code Climate analysis, it appears that Prettier plugins, though properly configured in our project, are not detected or used by the ESLint engine. This results in a MODULE_NOT_FOUND error which ends up with the entire github workflow failing with the runtime error.

Expected Behavior

It would be better if the plugin is skipped similar to the unsupported plugins in the eslint instead of a runtime error, or it would be best if there is an option in the config to add these plugins (npm packages) at runtime.

Steps to Reproduce

Necessary config files

  1. .codeclimate.yml
plugins:
  eslint:
    enabled: false
    channel: "eslint-7"
  1. .eslintrc.json
{
 "env": {
    "browser": true,
    "node": true,
    "es2021": true
  },
  "extends": [
    "plugin:prettier/recommended"
  ],
}
  1. .prettierrc.json
{
  "tailwindFunctions": [
    "classNames"
  ],
  "plugins": [
    "prettier-plugin-tailwindcss"
  ]
}
  1. package.json
{
  "devDependencies": {
    "eslint": "^8.44.0",
    "eslint-config-prettier": "^8.8.0",
    "eslint-plugin-prettier": "^4.2.1",
    "prettier": "^2.8.8",
    "prettier-plugin-tailwindcss": "^0.4.0"
  }
}

Relevant links

  1. We are facing the above-mentioned issue in one of our open-sourced projects https://github.com/coronasafe/care_fe
  2. Here is the issue filled for that in our repository Fix the code climate action coronasafe/care_fe#7563
  3. Here is the failing action https://codeclimate.com/github/coronasafe/care_fe/builds/19007
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

1 participant