Search code examples
typescriptintellij-ideaintellij-inspections

How do I create an inspection in IntelliJ for relative imports in TypeScript?


I create a new User defined inspection, using Structural search, and put this in the Search template:

from '../

But I can't get it to work. Neither do these:

"from '../"

import $something$ from '../$path$'

I can't even get a hit when is try this:

from

What do I do now?


Solution

  • Don't use Structural search. Add a RegExp instead

    from '\.\./