Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.06 KB

no-deprecated.md

File metadata and controls

42 lines (31 loc) · 1.06 KB

no-deprecated

Stage: 0

NOTE: this rule is currently a work in progress. There may be "breaking" changes: most likely, additional cases that are flagged.

Reports use of a deprecated name, as indicated by a JSDoc block with a @deprecated tag, i.e.

// @file: ./answer.js

/**
 * this is what you get when you trust a mouse talk show
 * @deprecated need to restart the experiment
 * @returns {Number} nonsense
 */
export function multiply(six, nine) {
  return 42
}

will report as such:

import { multiply } from './answer' // Deprecated: need to restart the experiment

function whatever(y, z) {
  return multiply(y, z) // Deprecated: need to restart the experiment
}

Worklist

  • report explicit imports on the import node
  • support namespaces
    • should bubble up through deep namespaces (#157)
  • report explicit imports at reference time (at the identifier) similar to namespace
  • mark module deprecated if file JSDoc has a @deprecated tag?
  • don't flag redeclaration of imported, deprecated names
  • flag destructuring