Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/jsx-fragments.js
rd565449 r0c6b92a 23 23 24 24 const messages = { 25 fragmentsNotSupported: 'Fragments are only supported starting from React v16.2. ' 26 + 'Please disable the `react/jsx-fragments` rule in `eslint` settings or upgrade your version of React.', 25 fragmentsNotSupported: 'Fragments are only supported starting from React v16.2. Please disable the `react/jsx-fragments` rule in `eslint` settings or upgrade your version of React.', 27 26 preferPragma: 'Prefer {{react}}.{{fragment}} over fragment shorthand', 28 27 preferFragment: 'Prefer fragment shorthand over {{react}}.{{fragment}}', 29 28 }; 30 29 30 /** @type {import('eslint').Rule.RuleModule} */ 31 31 module.exports = { 32 32 meta: { … … 171 171 if (node.source && node.source.value === 'react') { 172 172 node.specifiers.forEach((spec) => { 173 if ( spec.imported && spec.imported.name === fragmentPragma) {173 if ('imported' in spec && spec.imported && spec.imported.name === fragmentPragma) { 174 174 if (spec.local) { 175 175 fragmentNames.add(spec.local.name);
Note:
See TracChangeset
for help on using the changeset viewer.