Checks for unused or duplicate imports.

Configuration

{
    "type": "UnusedImport",
    "props": {
        "severity": "WARNING",
        "ignoreModules": [
            "haxe.macro.Type"
        ],
        "moduleTypeMap": {
            "haxe.macro.Expr": [
                "ExprDef",
                "ComplexType"
            ]
        }
    }
}

Limitation: Unused import check has no information about imported modules and the types contained within, other than the name used in import specification.

Valid

package com.project;

import haxe.macro.Expr;
import com.test.Type;
import com.project.sub.Type2;

class Main extends Type {
    var type:Type2;
    var exprDef:ExprDef;
}

Invalid

package com.project;

import com.test.Type;
import com.project.sub.Type2;
import com.project.sub.Type2;
import com.project.SomeType;

import String;

class Main extends Type2 implements SomeType {
}