eslint-plugin-require-extensions
eslint-plugin-require-extensions copied to clipboard
how to use it in the new eslint flat config
When using custom TypeScript paths the import is completely ignored (and therefore ESM invalid): ```ts import { hello } from "@/world"; // IGNORED! import { test } from "@/world/wow" //...
What is the purpose of the "plugins" section? For me it works well with just the extends section. ```json { "extends": [ "plugin:require-extensions/recommended" ], "plugins": [ "require-extensions" ] } ```
Hello! Thank you for this great library! However, it seems that it doesn't treat the `.jsx` extensions right. It replaces imports like: `import { Component } from './component.jsx';` to `import...
Premise: Thanks for this plugin, is awesome! When autofixing via `eslint --fix` this plugin forces all imports to have single quotes (`'`). The correct behaviour should apply the correct configured...
I have this in my mocha test ```js before(() => import('../../sparql')) ``` The plugin did not recognize this as a needing `.js` extension
Fix #11 **NOTE:** I based this PR on top of #16 since I wanted to reuse the tests, so you'll want to merge that PR first
This PR adds extensive unit test coverage for the existing functionality and fixes two issues: - directory imports with trailing slashes would result in imports from `./dir//index` - imports where...
Fix #12, #13 and #18 ### Disclaimer: - This fix keeps functionality (almost) identical to the original, just adds eslint v9 and flat config support - There is a rewrite...
With `npx @eslint/migrate-config .eslintrc.json` migrated my config to `eslint.config.js` for eslint v9 and got: ``` ESLint: 9.13.0 Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /node_modules/eslint-plugin-require-extensions/package.json imported from eslint.config.mjs at exportsNotFound...