pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
908 stars 317 forks source link

Enhancement: Deprecation eslint rule #6237

Closed milanholemans closed 17 hours ago

milanholemans commented 1 month ago

Noticed that our codebase uses some deprecated functions in some places.

image

Maybe it's worth it to finally get rid of these deprecated functions. We can also enable an eslint rule so we're notified when other functions are being deprecated.

Examples: https://www.npmjs.com/package/eslint-plugin-deprecation https://www.npmjs.com/package/eslint-plugin-deprecate

Adam-it commented 1 month ago

Good idea 👍. Let's do that 🚢

MartinM85 commented 1 month ago

Can I take it?

MartinM85 commented 1 month ago

Just a short summary https://www.npmjs.com/package/eslint-plugin-deprecation checks for @deprecated JSDoc tag and allows to throw an error when a deprecated function is detected is some module. https://www.npmjs.com/package/eslint-plugin-deprecate doesn't check for @deprecated JSDoc tag. It allows to define elint rules to forbid some function usage and to suggest some alternatives. If a function in some module is deprecated, we won't detect it with this elint plugin.

I'm using eslint-plugin-deprecation

milanholemans commented 1 month ago

Thanks for the useful info @MartinM85! This should be the right one indeed.

waldekmastykarz commented 17 hours ago

Seems like we can't implement this fully due to the plugin not being able to handle our code base. Let's close this issue for now and revisit it in the future should things change.