Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

No-relative-imports - allow-siblings flag not working #778

@robgraeber

Description

@robgraeber

Bug Report

  • tslint-microsoft-contrib: 6.0.0
  • TSLint version: 5.12.0
  • TypeScript version: 3.2.2
  • Running TSLint via: CLI + VSCode

TypeScript code being linted

import { chunkArray } from './Utils';

chunkArray([1, 2, 3], 1);

with tslint.json configuration:

"no-relative-imports": [true, "allow-siblings"],

Actual behavior

It's throwing an error for no-relative-imports.

Expected behavior

It would respect the "allow-siblings" flag and not be an error.

The weird thing about this is that it seemed to work correctly for me for a day, then the next day it stopped respecting the allow-siblings flag. I verified my node_modules were up to date. This is a very stripped down version of my project that seems to have the issue, run npm install && npm test and I get:
ERROR: /Users/bobby/Code/test-proj/src/Example.ts:1:1 - Imported module is being loaded from a relative path. Please use an absolute path: import { chunkArray } from './Utils';

test-proj.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalIssues that should be addressed in other repositories.Type: Bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions