cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Enhancement: Deprecation eslint rule

Open milanholemans opened this issue 1 year ago • 4 comments

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

milanholemans avatar Aug 10 '24 19:08 milanholemans

Good idea 👍. Let's do that 🚢

Adam-it avatar Aug 11 '24 06:08 Adam-it

Can I take it?

MartinM85 avatar Aug 13 '24 06:08 MartinM85

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

MartinM85 avatar Aug 14 '24 12:08 MartinM85

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

milanholemans avatar Aug 14 '24 12:08 milanholemans

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.

waldekmastykarz avatar Sep 15 '24 13:09 waldekmastykarz