Typescript-react-starter: Import sources within a group must be alphabetized

Created on 2 Jul 2018  路  3Comments  路  Source: microsoft/TypeScript-React-Starter

Hi,
if I put the the following line at the top of the file I get "Import sources within a group must be alphabetized"
import Hello from './components/Hello';

the line should be placed just before import './index.css'; instead.

Most helpful comment

You must sort your imports alphabetically, just like this
image

or

You can config with the typescript in the file of tslint.json, just like this

"rules": {
    "ordered-imports": [false],
    "object-literal-sort-keys": [false]
  }

All 3 comments

I noticed that tslint.json is different in Git than what gets generated after running the startup scripts. I logged a related linting issue at #165

You must sort your imports alphabetically, just like this
image

or

You can config with the typescript in the file of tslint.json, just like this

"rules": {
    "ordered-imports": [false],
    "object-literal-sort-keys": [false]
  }

good

Was this page helpful?
0 / 5 - 0 ratings