microsoft/TypeScript-React-Starter

TSLint complains about import order in src/components/Hello.test.tsx

gomisha opened this issue · 2 comments

TSLint message: Import sources within a group must be alphabetized. (ordered-imports)

file: src/components/Hello.test.tsx:

existing:
import * as React from 'react';
import * as enzyme from 'enzyme';
import Hello from './Hello';

should be:
import * as enzyme from 'enzyme';
import * as React from 'react';
import Hello from './Hello';

I noticed that tslint.json is different in Git than what gets generated after running the startup scripts.

This can be solved with these rules (that solves also other problems ...) in your tslint.json

"rules": {
    "object-literal-sort-keys": false,
    "interface-name": false,
    "member-access": [true, "no-public"],
    "ordered-imports": false
  },