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

etc/no-deprecated: support detection within `exports`

Open Hotell opened this issue 3 years ago • 0 comments

would it be possible to add export detection capabilities ?

context: Currently we are using https://github.com/gund/eslint-plugin-deprecation which is terribly slow. etc plugin provides much better performance, but in order to be able to migrate we would need to add this functionality.

Current Behaviour

// src/foo.ts

// @deprecated use world instead
export const hello = 'world'

export const world = 'this one'

// src/index.ts

// 🚨 No error
export {hello} from './foo'
// ✅ No error
export {world} from './foo'

New Behaviour

// src/foo.ts

// @deprecated use world instead
export const hello = 'world'

export const world = 'this one'

// src/index.ts

// ✅ etc/no-deprecated Errors
export {hello} from './foo'
// ✅ No error
export {world} from './foo'

Hotell avatar Mar 16 '22 22:03 Hotell