-
-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Description
A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open a discussion.
Environment
- Ruby version: /
- Rails version: /
- Shakapacker/Webpacker version: /
- React on Rails version:
14.1.1
Behavior
Eslint raises Unable to resolve path to module 'react-on-rails' import/no-unresolved on version 14.1.1, but not on version 14.1.0.
Small, reproducible repo
// package.json
{
"type": "module",
"dependencies": {
"eslint": "^9.18.0",
"eslint-plugin-import": "^2.31.0",
"react-on-rails": "14.1.1"
}
}// eslint.config.js
import importPlugin from 'eslint-plugin-import';
import js from '@eslint/js';
export default [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
{
files: ['**/*.{js,mjs,cjs}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'no-unused-vars': 'off',
'import/no-dynamic-require': 'warn',
'import/no-nodejs-modules': 'warn',
},
},
];// test.js
import ReactOnRails from 'react-on-rails';Run with:
eslint test.js
storm2513
Metadata
Metadata
Assignees
Labels
No labels