Skip to content

Add "unassigned" to importType for order rule #970

Open
@hotforfeature

Description

@hotforfeature

I would like to group and order unassigned imports. This specific use case is for importing Polymer 2 html elements with polymer-webpack-loader.

import { Component } from '@angular/core';

import 'bower_components/paper-button/paper-button.html';

import { value } from '../parent'; 
import { other } from './sibling';

The proposed .eslintrc to achieve the above style would be

"import/order": [
  "error", 
  {
    "groups": ["builtin", "external", "unassigned", ["parent", "sibling", "index"]],
    "newlines-between": "always"
  }
]

At the moment unassigned imports are completely ignored.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions