@lexical/eslint-plugin 0.38.3-nightly.20251210.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ function getDefaultExportFromCjs (x) {
25
25
  }
26
26
 
27
27
  var name$1 = "@lexical/eslint-plugin";
28
- var version$1 = "0.38.3-nightly.20251210.0";
28
+ var version$1 = "0.39.0";
29
29
  var require$$0 = {
30
30
  name: name$1,
31
31
  version: version$1};
@@ -23,7 +23,7 @@ function getDefaultExportFromCjs (x) {
23
23
  }
24
24
 
25
25
  var name$1 = "@lexical/eslint-plugin";
26
- var version$1 = "0.38.3-nightly.20251210.0";
26
+ var version$1 = "0.39.0";
27
27
  var require$$0 = {
28
28
  name: name$1,
29
29
  version: version$1};
@@ -6,4 +6,4 @@
6
6
  *
7
7
  */
8
8
 
9
- "use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(var i in r)"default"===i||i in e||(e[i]=r[i])}return e}function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={name:"@lexical/eslint-plugin",version:"0.38.3-nightly.20251210.0"},r={},i={},o={getParentAssignmentName:function(e){const t=e.parent;return"VariableDeclarator"===t.type&&t.init===e?t.id:"AssignmentExpression"===t.type&&t.right===e&&"="===t.operator?t.left:void 0}};const{getParentAssignmentName:s}=o;i.getFunctionName=function(e){return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type&&e.id?e.id:"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type?s(e):void 0};var a={};function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a.buildMatcher=function(...e){const t=[],n=[];for(const r of e.flat(1))r&&("string"==typeof r?n.push(/^[(^]/.test(r)?r:`^${c(r)}$`):r&&r instanceof RegExp?r.flags?t.push(e=>r.test(e)):n.push(r.source):"function"==typeof r&&t.push(r));const r=n.map(e=>`(?:${e})`).join("|");if(r){const e=new RegExp(r);t.push(t=>e.test(t))}return e=>{if(e){if("Identifier"!==e.type)throw new Error(`Expecting Identifier, not ${e.type}`);for(const n of t)if(n(e.name,e))return!0}return!1}};const{getFunctionName:l}=i,{getParentAssignmentName:u}=o,{buildMatcher:p}=a;const f={isDollarFunction:[/^\$[a-z_]/],isIgnoredFunction:[],isLexicalProvider:["parseEditorState","read","registerCommand","registerNodeTransform","update"],isSafeDollarFunction:[/^\$is[A-Z_]/]};function d(e){if(e)return"Identifier"===e.type?e:"MemberExpression"!==e.type||e.computed?void 0:d(e.property)}function g(e,t){const n=Array.isArray(e.options)?e.options[0]:void 0;return n&&t in n?n[t]:void 0}const x={oneOf:[{type:"string"},{contains:{type:"string"},type:"array"}]};r.rulesOfLexical={create(e){const t=function(e){return e.getSourceCode()}(e),n=function(e){const t={};for(const n in f){const r=n;t[r]=p(f[r],g(e,r))}return t}(e),r=new Set,i=new Set,o=[],s=e=>r.add(e),a=e=>r.delete(e),c=e=>{const t=d(function(e){const t=l(e);if(t)return t;const n=e.parent;if("CallExpression"===n.type&&n.arguments[0]===e&&function(e){return e&&"Identifier"===e.type&&/^use([A-Z]|$)/.test(e.name)}(d(n.callee)))return u(n)}(e));o.push({name:t,node:e}),(n.isDollarFunction(t)||n.isIgnoredFunction(t)||n.isLexicalProvider(t))&&s(e)},x=e=>{o.pop(),a(e)};return{ArrowFunctionExpression:c,"ArrowFunctionExpression:exit":x,CallExpression:a=>{if((()=>{if(r.size>0)return!0;const e=o[o.length-1];return e&&"Property"===e.node.parent.type})())return;const c=d(a.callee);if(n.isLexicalProvider(c)||n.isSafeDollarFunction(c))return void s(a);if(!n.isDollarFunction(c))return;const l=(()=>{const e=o[o.length-1];return e?e.name:void 0})();if(!l||i.has(l))return;i.add(l);const u=function(e,t){const n=e.scopeManager;for(let e=t;e;e=e.parent){const r=n.getDeclaredVariables(e).find(e=>e.identifiers.includes(t));if(r)return r;const i=n.acquire(e);if(i)return i.set.get(t.name)||(i.upper?i.upper.set.get(t.name):void 0)}}(t,l),p=function(e,t){const n=function(e){return/^[a-z]/.test(e)?"$"+e:/^[A-Z][a-z]/.test(e)?"$"+e.slice(0,1).toLowerCase()+e.slice(1):`$_${e}`}(e.name);if(t)for(let e=t.scope;e;e=e.upper)if(e.set.has(n))return n+"_";return n}(l,u),f=function(e){if(e&&1===e.defs.length){const[{node:t}]=e.defs;if("ExportNamedDeclaration"===t.parent.type)return t.parent;if("VariableDeclaration"===t.parent.type&&"ExportNamedDeclaration"===t.parent.parent.type)return t.parent.parent}}(u),g={callee:t.getText(a.callee),caller:t.getText(l),suggestName:p},x=e=>{const t=new Set,n=[],r=r=>{t.has(r)||(t.add(r),n.push(e.replaceText(r,p)))};if(r(l),f&&n.push(e.insertTextAfter(f,function({caller:e,suggestName:t}){return`\n/** @deprecated renamed to {@link ${t}} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${e} = ${t};`}(g))),u)for(const e of u.references)r(e.identifier);return n};e.report({data:g,fix:x,messageId:"rulesOfLexicalReport",node:l,suggest:[{data:g,fix:x,messageId:"rulesOfLexicalSuggestion"}]})},"CallExpression:exit":a,ClassBody:s,"ClassBody:exit":a,FunctionDeclaration:c,"FunctionDeclaration:exit":x,FunctionExpression:c,"FunctionExpression:exit":x}},meta:{docs:{description:"enforces the Rules of Lexical",recommended:!0,url:"https://lexical.dev/docs/packages/lexical-eslint-plugin"},fixable:"code",hasSuggestions:!0,messages:{rulesOfLexicalReport:"{{ callee }} called from {{ caller }}, without $ prefix or read/update context",rulesOfLexicalSuggestion:"Rename {{ caller }} to {{ suggestName }}"},schema:[{additionalProperties:!1,properties:{isDollarFunction:x,isIgnoredFunction:x,isLexicalProvider:x,isSafeDollarFunction:x},type:"object"}],type:"suggestion"}};const{name:m,version:y}=n,{rulesOfLexical:h}=r,v={plugins:["@lexical"],rules:{"@lexical/rules-of-lexical":"warn"}};var F={configs:{all:v,recommended:v},meta:{name:m,version:y},rules:{"rules-of-lexical":h}},E=e({__proto__:null,default:t(F)},[F]);module.exports=E;
9
+ "use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(var i in r)"default"===i||i in e||(e[i]=r[i])}return e}function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={name:"@lexical/eslint-plugin",version:"0.39.0"},r={},i={},o={getParentAssignmentName:function(e){const t=e.parent;return"VariableDeclarator"===t.type&&t.init===e?t.id:"AssignmentExpression"===t.type&&t.right===e&&"="===t.operator?t.left:void 0}};const{getParentAssignmentName:s}=o;i.getFunctionName=function(e){return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type&&e.id?e.id:"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type?s(e):void 0};var a={};function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a.buildMatcher=function(...e){const t=[],n=[];for(const r of e.flat(1))r&&("string"==typeof r?n.push(/^[(^]/.test(r)?r:`^${c(r)}$`):r&&r instanceof RegExp?r.flags?t.push(e=>r.test(e)):n.push(r.source):"function"==typeof r&&t.push(r));const r=n.map(e=>`(?:${e})`).join("|");if(r){const e=new RegExp(r);t.push(t=>e.test(t))}return e=>{if(e){if("Identifier"!==e.type)throw new Error(`Expecting Identifier, not ${e.type}`);for(const n of t)if(n(e.name,e))return!0}return!1}};const{getFunctionName:l}=i,{getParentAssignmentName:u}=o,{buildMatcher:p}=a;const f={isDollarFunction:[/^\$[a-z_]/],isIgnoredFunction:[],isLexicalProvider:["parseEditorState","read","registerCommand","registerNodeTransform","update"],isSafeDollarFunction:[/^\$is[A-Z_]/]};function d(e){if(e)return"Identifier"===e.type?e:"MemberExpression"!==e.type||e.computed?void 0:d(e.property)}function g(e,t){const n=Array.isArray(e.options)?e.options[0]:void 0;return n&&t in n?n[t]:void 0}const x={oneOf:[{type:"string"},{contains:{type:"string"},type:"array"}]};r.rulesOfLexical={create(e){const t=function(e){return e.getSourceCode()}(e),n=function(e){const t={};for(const n in f){const r=n;t[r]=p(f[r],g(e,r))}return t}(e),r=new Set,i=new Set,o=[],s=e=>r.add(e),a=e=>r.delete(e),c=e=>{const t=d(function(e){const t=l(e);if(t)return t;const n=e.parent;if("CallExpression"===n.type&&n.arguments[0]===e&&function(e){return e&&"Identifier"===e.type&&/^use([A-Z]|$)/.test(e.name)}(d(n.callee)))return u(n)}(e));o.push({name:t,node:e}),(n.isDollarFunction(t)||n.isIgnoredFunction(t)||n.isLexicalProvider(t))&&s(e)},x=e=>{o.pop(),a(e)};return{ArrowFunctionExpression:c,"ArrowFunctionExpression:exit":x,CallExpression:a=>{if((()=>{if(r.size>0)return!0;const e=o[o.length-1];return e&&"Property"===e.node.parent.type})())return;const c=d(a.callee);if(n.isLexicalProvider(c)||n.isSafeDollarFunction(c))return void s(a);if(!n.isDollarFunction(c))return;const l=(()=>{const e=o[o.length-1];return e?e.name:void 0})();if(!l||i.has(l))return;i.add(l);const u=function(e,t){const n=e.scopeManager;for(let e=t;e;e=e.parent){const r=n.getDeclaredVariables(e).find(e=>e.identifiers.includes(t));if(r)return r;const i=n.acquire(e);if(i)return i.set.get(t.name)||(i.upper?i.upper.set.get(t.name):void 0)}}(t,l),p=function(e,t){const n=function(e){return/^[a-z]/.test(e)?"$"+e:/^[A-Z][a-z]/.test(e)?"$"+e.slice(0,1).toLowerCase()+e.slice(1):`$_${e}`}(e.name);if(t)for(let e=t.scope;e;e=e.upper)if(e.set.has(n))return n+"_";return n}(l,u),f=function(e){if(e&&1===e.defs.length){const[{node:t}]=e.defs;if("ExportNamedDeclaration"===t.parent.type)return t.parent;if("VariableDeclaration"===t.parent.type&&"ExportNamedDeclaration"===t.parent.parent.type)return t.parent.parent}}(u),g={callee:t.getText(a.callee),caller:t.getText(l),suggestName:p},x=e=>{const t=new Set,n=[],r=r=>{t.has(r)||(t.add(r),n.push(e.replaceText(r,p)))};if(r(l),f&&n.push(e.insertTextAfter(f,function({caller:e,suggestName:t}){return`\n/** @deprecated renamed to {@link ${t}} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${e} = ${t};`}(g))),u)for(const e of u.references)r(e.identifier);return n};e.report({data:g,fix:x,messageId:"rulesOfLexicalReport",node:l,suggest:[{data:g,fix:x,messageId:"rulesOfLexicalSuggestion"}]})},"CallExpression:exit":a,ClassBody:s,"ClassBody:exit":a,FunctionDeclaration:c,"FunctionDeclaration:exit":x,FunctionExpression:c,"FunctionExpression:exit":x}},meta:{docs:{description:"enforces the Rules of Lexical",recommended:!0,url:"https://lexical.dev/docs/packages/lexical-eslint-plugin"},fixable:"code",hasSuggestions:!0,messages:{rulesOfLexicalReport:"{{ callee }} called from {{ caller }}, without $ prefix or read/update context",rulesOfLexicalSuggestion:"Rename {{ caller }} to {{ suggestName }}"},schema:[{additionalProperties:!1,properties:{isDollarFunction:x,isIgnoredFunction:x,isLexicalProvider:x,isSafeDollarFunction:x},type:"object"}],type:"suggestion"}};const{name:m,version:y}=n,{rulesOfLexical:h}=r,v={plugins:["@lexical"],rules:{"@lexical/rules-of-lexical":"warn"}};var F={configs:{all:v,recommended:v},meta:{name:m,version:y},rules:{"rules-of-lexical":h}},E=e({__proto__:null,default:t(F)},[F]);module.exports=E;
@@ -6,4 +6,4 @@
6
6
  *
7
7
  */
8
8
 
9
- function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(var i in r)"default"===i||i in e||(e[i]=r[i])}return e}function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={name:"@lexical/eslint-plugin",version:"0.38.3-nightly.20251210.0"},r={},i={},o={getParentAssignmentName:function(e){const t=e.parent;return"VariableDeclarator"===t.type&&t.init===e?t.id:"AssignmentExpression"===t.type&&t.right===e&&"="===t.operator?t.left:void 0}};const{getParentAssignmentName:s}=o;i.getFunctionName=function(e){return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type&&e.id?e.id:"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type?s(e):void 0};var a={};function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a.buildMatcher=function(...e){const t=[],n=[];for(const r of e.flat(1))r&&("string"==typeof r?n.push(/^[(^]/.test(r)?r:`^${c(r)}$`):r&&r instanceof RegExp?r.flags?t.push(e=>r.test(e)):n.push(r.source):"function"==typeof r&&t.push(r));const r=n.map(e=>`(?:${e})`).join("|");if(r){const e=new RegExp(r);t.push(t=>e.test(t))}return e=>{if(e){if("Identifier"!==e.type)throw new Error(`Expecting Identifier, not ${e.type}`);for(const n of t)if(n(e.name,e))return!0}return!1}};const{getFunctionName:l}=i,{getParentAssignmentName:u}=o,{buildMatcher:p}=a;const f={isDollarFunction:[/^\$[a-z_]/],isIgnoredFunction:[],isLexicalProvider:["parseEditorState","read","registerCommand","registerNodeTransform","update"],isSafeDollarFunction:[/^\$is[A-Z_]/]};function d(e){if(e)return"Identifier"===e.type?e:"MemberExpression"!==e.type||e.computed?void 0:d(e.property)}function g(e,t){const n=Array.isArray(e.options)?e.options[0]:void 0;return n&&t in n?n[t]:void 0}const x={oneOf:[{type:"string"},{contains:{type:"string"},type:"array"}]};r.rulesOfLexical={create(e){const t=function(e){return e.getSourceCode()}(e),n=function(e){const t={};for(const n in f){const r=n;t[r]=p(f[r],g(e,r))}return t}(e),r=new Set,i=new Set,o=[],s=e=>r.add(e),a=e=>r.delete(e),c=e=>{const t=d(function(e){const t=l(e);if(t)return t;const n=e.parent;if("CallExpression"===n.type&&n.arguments[0]===e&&function(e){return e&&"Identifier"===e.type&&/^use([A-Z]|$)/.test(e.name)}(d(n.callee)))return u(n)}(e));o.push({name:t,node:e}),(n.isDollarFunction(t)||n.isIgnoredFunction(t)||n.isLexicalProvider(t))&&s(e)},x=e=>{o.pop(),a(e)};return{ArrowFunctionExpression:c,"ArrowFunctionExpression:exit":x,CallExpression:a=>{if((()=>{if(r.size>0)return!0;const e=o[o.length-1];return e&&"Property"===e.node.parent.type})())return;const c=d(a.callee);if(n.isLexicalProvider(c)||n.isSafeDollarFunction(c))return void s(a);if(!n.isDollarFunction(c))return;const l=(()=>{const e=o[o.length-1];return e?e.name:void 0})();if(!l||i.has(l))return;i.add(l);const u=function(e,t){const n=e.scopeManager;for(let e=t;e;e=e.parent){const r=n.getDeclaredVariables(e).find(e=>e.identifiers.includes(t));if(r)return r;const i=n.acquire(e);if(i)return i.set.get(t.name)||(i.upper?i.upper.set.get(t.name):void 0)}}(t,l),p=function(e,t){const n=function(e){return/^[a-z]/.test(e)?"$"+e:/^[A-Z][a-z]/.test(e)?"$"+e.slice(0,1).toLowerCase()+e.slice(1):`$_${e}`}(e.name);if(t)for(let e=t.scope;e;e=e.upper)if(e.set.has(n))return n+"_";return n}(l,u),f=function(e){if(e&&1===e.defs.length){const[{node:t}]=e.defs;if("ExportNamedDeclaration"===t.parent.type)return t.parent;if("VariableDeclaration"===t.parent.type&&"ExportNamedDeclaration"===t.parent.parent.type)return t.parent.parent}}(u),g={callee:t.getText(a.callee),caller:t.getText(l),suggestName:p},x=e=>{const t=new Set,n=[],r=r=>{t.has(r)||(t.add(r),n.push(e.replaceText(r,p)))};if(r(l),f&&n.push(e.insertTextAfter(f,function({caller:e,suggestName:t}){return`\n/** @deprecated renamed to {@link ${t}} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${e} = ${t};`}(g))),u)for(const e of u.references)r(e.identifier);return n};e.report({data:g,fix:x,messageId:"rulesOfLexicalReport",node:l,suggest:[{data:g,fix:x,messageId:"rulesOfLexicalSuggestion"}]})},"CallExpression:exit":a,ClassBody:s,"ClassBody:exit":a,FunctionDeclaration:c,"FunctionDeclaration:exit":x,FunctionExpression:c,"FunctionExpression:exit":x}},meta:{docs:{description:"enforces the Rules of Lexical",recommended:!0,url:"https://lexical.dev/docs/packages/lexical-eslint-plugin"},fixable:"code",hasSuggestions:!0,messages:{rulesOfLexicalReport:"{{ callee }} called from {{ caller }}, without $ prefix or read/update context",rulesOfLexicalSuggestion:"Rename {{ caller }} to {{ suggestName }}"},schema:[{additionalProperties:!1,properties:{isDollarFunction:x,isIgnoredFunction:x,isLexicalProvider:x,isSafeDollarFunction:x},type:"object"}],type:"suggestion"}};const{name:m,version:y}=n,{rulesOfLexical:h}=r,v={plugins:["@lexical"],rules:{"@lexical/rules-of-lexical":"warn"}};var F={configs:{all:v,recommended:v},meta:{name:m,version:y},rules:{"rules-of-lexical":h}},E=e({__proto__:null,default:t(F)},[F]);export{E as default};
9
+ function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(var i in r)"default"===i||i in e||(e[i]=r[i])}return e}function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={name:"@lexical/eslint-plugin",version:"0.39.0"},r={},i={},o={getParentAssignmentName:function(e){const t=e.parent;return"VariableDeclarator"===t.type&&t.init===e?t.id:"AssignmentExpression"===t.type&&t.right===e&&"="===t.operator?t.left:void 0}};const{getParentAssignmentName:s}=o;i.getFunctionName=function(e){return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type&&e.id?e.id:"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type?s(e):void 0};var a={};function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a.buildMatcher=function(...e){const t=[],n=[];for(const r of e.flat(1))r&&("string"==typeof r?n.push(/^[(^]/.test(r)?r:`^${c(r)}$`):r&&r instanceof RegExp?r.flags?t.push(e=>r.test(e)):n.push(r.source):"function"==typeof r&&t.push(r));const r=n.map(e=>`(?:${e})`).join("|");if(r){const e=new RegExp(r);t.push(t=>e.test(t))}return e=>{if(e){if("Identifier"!==e.type)throw new Error(`Expecting Identifier, not ${e.type}`);for(const n of t)if(n(e.name,e))return!0}return!1}};const{getFunctionName:l}=i,{getParentAssignmentName:u}=o,{buildMatcher:p}=a;const f={isDollarFunction:[/^\$[a-z_]/],isIgnoredFunction:[],isLexicalProvider:["parseEditorState","read","registerCommand","registerNodeTransform","update"],isSafeDollarFunction:[/^\$is[A-Z_]/]};function d(e){if(e)return"Identifier"===e.type?e:"MemberExpression"!==e.type||e.computed?void 0:d(e.property)}function g(e,t){const n=Array.isArray(e.options)?e.options[0]:void 0;return n&&t in n?n[t]:void 0}const x={oneOf:[{type:"string"},{contains:{type:"string"},type:"array"}]};r.rulesOfLexical={create(e){const t=function(e){return e.getSourceCode()}(e),n=function(e){const t={};for(const n in f){const r=n;t[r]=p(f[r],g(e,r))}return t}(e),r=new Set,i=new Set,o=[],s=e=>r.add(e),a=e=>r.delete(e),c=e=>{const t=d(function(e){const t=l(e);if(t)return t;const n=e.parent;if("CallExpression"===n.type&&n.arguments[0]===e&&function(e){return e&&"Identifier"===e.type&&/^use([A-Z]|$)/.test(e.name)}(d(n.callee)))return u(n)}(e));o.push({name:t,node:e}),(n.isDollarFunction(t)||n.isIgnoredFunction(t)||n.isLexicalProvider(t))&&s(e)},x=e=>{o.pop(),a(e)};return{ArrowFunctionExpression:c,"ArrowFunctionExpression:exit":x,CallExpression:a=>{if((()=>{if(r.size>0)return!0;const e=o[o.length-1];return e&&"Property"===e.node.parent.type})())return;const c=d(a.callee);if(n.isLexicalProvider(c)||n.isSafeDollarFunction(c))return void s(a);if(!n.isDollarFunction(c))return;const l=(()=>{const e=o[o.length-1];return e?e.name:void 0})();if(!l||i.has(l))return;i.add(l);const u=function(e,t){const n=e.scopeManager;for(let e=t;e;e=e.parent){const r=n.getDeclaredVariables(e).find(e=>e.identifiers.includes(t));if(r)return r;const i=n.acquire(e);if(i)return i.set.get(t.name)||(i.upper?i.upper.set.get(t.name):void 0)}}(t,l),p=function(e,t){const n=function(e){return/^[a-z]/.test(e)?"$"+e:/^[A-Z][a-z]/.test(e)?"$"+e.slice(0,1).toLowerCase()+e.slice(1):`$_${e}`}(e.name);if(t)for(let e=t.scope;e;e=e.upper)if(e.set.has(n))return n+"_";return n}(l,u),f=function(e){if(e&&1===e.defs.length){const[{node:t}]=e.defs;if("ExportNamedDeclaration"===t.parent.type)return t.parent;if("VariableDeclaration"===t.parent.type&&"ExportNamedDeclaration"===t.parent.parent.type)return t.parent.parent}}(u),g={callee:t.getText(a.callee),caller:t.getText(l),suggestName:p},x=e=>{const t=new Set,n=[],r=r=>{t.has(r)||(t.add(r),n.push(e.replaceText(r,p)))};if(r(l),f&&n.push(e.insertTextAfter(f,function({caller:e,suggestName:t}){return`\n/** @deprecated renamed to {@link ${t}} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${e} = ${t};`}(g))),u)for(const e of u.references)r(e.identifier);return n};e.report({data:g,fix:x,messageId:"rulesOfLexicalReport",node:l,suggest:[{data:g,fix:x,messageId:"rulesOfLexicalSuggestion"}]})},"CallExpression:exit":a,ClassBody:s,"ClassBody:exit":a,FunctionDeclaration:c,"FunctionDeclaration:exit":x,FunctionExpression:c,"FunctionExpression:exit":x}},meta:{docs:{description:"enforces the Rules of Lexical",recommended:!0,url:"https://lexical.dev/docs/packages/lexical-eslint-plugin"},fixable:"code",hasSuggestions:!0,messages:{rulesOfLexicalReport:"{{ callee }} called from {{ caller }}, without $ prefix or read/update context",rulesOfLexicalSuggestion:"Rename {{ caller }} to {{ suggestName }}"},schema:[{additionalProperties:!1,properties:{isDollarFunction:x,isIgnoredFunction:x,isLexicalProvider:x,isSafeDollarFunction:x},type:"object"}],type:"suggestion"}};const{name:m,version:y}=n,{rulesOfLexical:h}=r,v={plugins:["@lexical"],rules:{"@lexical/rules-of-lexical":"warn"}};var F={configs:{all:v,recommended:v},meta:{name:m,version:y},rules:{"rules-of-lexical":h}},E=e({__proto__:null,default:t(F)},[F]);export{E as default};
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "lexical",
9
9
  "editor"
10
10
  ],
11
- "version": "0.38.3-nightly.20251210.0",
11
+ "version": "0.39.0",
12
12
  "license": "MIT",
13
13
  "repository": {
14
14
  "type": "git",