chore: add new eslint-plugin with rule no-optional-chaining locally#3233
chore: add new eslint-plugin with rule no-optional-chaining locally#3233thegreatercurve merged 3 commits intofacebook:mainfrom
eslint-plugin with rule no-optional-chaining locally#3233Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Pretty sweet! Let's ignore test files and the playground, I guess |
|
Looks like we also need to ignore lexical-devtools |
Done 🚀 |
|
@shanpriyan Hi. I'm having some kind of problem with this eslint rule today. I've just synced my Lexical fork so I can update my local copy. However, I can't complete the commit with all the changes because ESLint is causing Husky to die on this plugin. Specifically:
Do you have any advice on how to fix this? Is it possible that you added a file system reference to your "npm registry list", a la https://stackoverflow.com/a/41200925 ? If so, what would I need to add? I can't even seem to remove the rule, as, each time I do, Husky seems to "magically" reinsert it. I'm definitely missing something here. Any thoughts that could help? |
... Ha! I asked for help in the Eslint Discord and the recommendation seems to have worked right quick:
Looks like this solves the problem. I'm cautiously optimistic! |



Resolves #3074
eslint-plugininside the project directory and added a new rule (no-optional-chaining) in it..eslintrc.jsto detect the usage of optional chainingeslint-plugin-lexicalto package.jsonRule reference: https://github.com/mysticatea/eslint-plugin-es/blob/master/lib/rules/no-optional-chaining.js