eslint-plugin-lodash icon indicating copy to clipboard operation
eslint-plugin-lodash copied to clipboard

add rule no-deprecated

Open abhirathore2006 opened this issue 6 years ago • 6 comments

Adding support no-deprecated rule to make migration to newer version easier

abhirathore2006 avatar May 09 '18 12:05 abhirathore2006

Hey, and thanks for contributing! This rule could help a lot with migration once Lodash v5 comes out, but I think it's a bit too specific. Since the plugin already contains a curated list of Lodash functions (or close enough that changing them is a feasible goal), I think a better rule would be something like no-deprecated, that reports for every method that doesn't exist in a specified version. (e.g. your declared version in the plugin could be version 4, but you could set the rule to version 5)

ganimomer avatar May 09 '18 13:05 ganimomer

@ganimomer thanks for advice, i will make appropriate changes

abhirathore2006 avatar May 09 '18 13:05 abhirathore2006

@ganimomer i updated the rule to no-deprecated

abhirathore2006 avatar May 14 '18 06:05 abhirathore2006

@ganimomer i am thinking to add deprecations list in methodDataByVersion files .

{
 _deprecations:{
    key:"message"
  }
}

abhirathore2006 avatar May 15 '18 06:05 abhirathore2006

@abhirathore2006 Sounds good, but why the _?

ganimomer avatar May 29 '18 14:05 ganimomer

@ganimomer to distinguish it from other properties, which are the names of actual functions

abhirathore2006 avatar May 29 '18 16:05 abhirathore2006