Tslint: How to disable a rule in tslint.json when extending?

Created on 30 Sep 2016  路  2Comments  路  Source: palantir/tslint

This is my tslint.json:

{
    "extends": [
        "tslint:latest"
    ],
    "rules": {
      "no-require-imports": false,
      "quotemark": [
        true, "single", "avoid-escape"
      ]
    }
}

I thought setting no-require-imports to false will allow me to use require in my code but I'm still getting "require statement not part of an import statement" errors.

How can I turn that rule off?

Question

Most helpful comment

@mohsen1 that lint failure is from the no-var-requires rule. Try using the verbose formatter to see which rule is triggering each failure. https://github.com/palantir/tslint/blob/24017dc49c64d45c5652798e357997d7faab23fa/src/rules/noVarRequiresRule.ts#L37

All 2 comments

@mohsen1 that lint failure is from the no-var-requires rule. Try using the verbose formatter to see which rule is triggering each failure. https://github.com/palantir/tslint/blob/24017dc49c64d45c5652798e357997d7faab23fa/src/rules/noVarRequiresRule.ts#L37

That worked. Thanks!

Was this page helpful?
0 / 5 - 0 ratings