Skip to content

Commit

Permalink
lint: imports order
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Feb 15, 2023
1 parent 64dff67 commit 49726cf
Show file tree
Hide file tree
Showing 40 changed files with 75 additions and 88 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"alwaysTryTypes": true,
"project": ["**/tsconfig.json"],
"projectFolderIgnoreList": ["**/node_modules/**"]
}
},
"node": true
},
"wc": {
"elementBaseClasses": ["LitElement"]
Expand All @@ -44,8 +45,9 @@
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"], "type"],
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"], "object", "unknown", "type"],
"newlines-between": "always",
"warnOnUnassignedImports": true,
"alphabetize": {
"order": "asc",
"caseInsensitive": true
Expand Down
2 changes: 1 addition & 1 deletion core/router/src/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {QueryParameters} from '@alwatr/type';
import type {QueryParameters} from '@alwatr/type';

/**
* Route context base type.
Expand Down
2 changes: 1 addition & 1 deletion core/signal/src/requestable-context-consumer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {contextConsumer} from './context-consumer.js';
import {requestContext} from './core.js';

import type{Stringifyable, OmitFirstParam} from '@alwatr/type';
import type {Stringifyable, OmitFirstParam} from '@alwatr/type';

/**
* Requestable context consumer interface.
Expand Down
2 changes: 1 addition & 1 deletion core/signal/src/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaybePromise, Stringifyable} from '@alwatr/type';
import type {MaybePromise, Stringifyable} from '@alwatr/type';

export type DebounceType = 'No' | 'AnimationFrame' | 'Timeout';

Expand Down
2 changes: 1 addition & 1 deletion services/comment/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {logger} from './config.js';
import './route/home.js';
import './route/patch.js';
import './route/storage.js';
import {logger} from './config.js';

logger.logOther('..:: Alwatr Comment API Nanoservice ::..');
1 change: 0 additions & 1 deletion services/form-registration/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {logger} from './config.js';

import './route/home.js';
import './route/put.js';

Expand Down
6 changes: 3 additions & 3 deletions services/storage-server/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {logger} from './config.js';
import './route/delete.js';
import './route/get.js';
import './route/has.js';
import './route/patch.js';
import './route/delete.js';
import './route/keys.js';
import './route/patch.js';
import './route/storage.js';
import {logger} from './config.js';

logger.logOther('..:: Alwatr Storage Server ::..');
4 changes: 2 additions & 2 deletions services/telegram-notifier/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import './bot/command/start.js';
import './route/home.js';
import './route/notify.js';
import {launchBot} from './bot/launch.js';
import {logger} from './config.js';
import './route/home.js';
import './route/notify.js';

logger.logOther('..:: Alwatr Telegram Notify Nanoservice ::..');

Expand Down
11 changes: 5 additions & 6 deletions ui/demo-pwa/src/alwatr-pwa.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import {html, customElement} from '@alwatr/element';
import '@alwatr/font/vazirmatn.css';
import {AlwatrPwaElement} from '@alwatr/pwa-helper/pwa-element.js';

import type {RoutesConfig} from '@alwatr/router';

import '@alwatr/ui-kit/style/theme/palette-300.css';
import '@alwatr/ui-kit/style/theme/color.css';
import '@alwatr/font/vazirmatn.css';
import '@alwatr/ui-kit/style/theme/palette-300.css';

import './page-chat.js';
import './page-card.js';
import './page-chat.js';

import type {RoutesConfig} from '@alwatr/router';

declare global {
interface HTMLElementTagNameMap {
Expand Down
5 changes: 2 additions & 3 deletions ui/demo-pwa/src/page-card.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {customElement, AlwatrSmartElement, css, html} from '@alwatr/element';

import '@alwatr/ui-kit/card/surface.js';
import '@alwatr/ui-kit/card/icon-box.js';
import '@alwatr/ui-kit/card/surface.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down Expand Up @@ -49,7 +48,7 @@ export class AlwatrPageCard extends AlwatrSmartElement {
}
input:focus {
border-bottom-color: currentColor;
border-bottom-color: currentcolor;
outline: 0;
}
`;
Expand Down
1 change: 0 additions & 1 deletion ui/demo-pwa/src/page-chat.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {customElement, AlwatrSmartElement, css, html} from '@alwatr/element';

import '@alwatr/ui-kit/chat/chat.js';

declare global {
Expand Down
7 changes: 3 additions & 4 deletions ui/pwa-helper/src/pwa-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import {AlwatrSmartElement, cache, html, css, type CSSResultGroup, type Property
import {localeContextConsumer, setLocale} from '@alwatr/i18n';
import {routeContextConsumer, routerOutlet, type RoutesConfig} from '@alwatr/router';
import {commandTrigger} from '@alwatr/signal';

import '@alwatr/ui-kit/snackbar/controller.js';
import '@alwatr/ui-kit/style/token.css';
import '@alwatr/ui-kit/style/pwa.css';
import '@alwatr/ui-kit/style/token.css';

import './signal/sw-user-notify.js';
import './signal/register-service-worker-command.js';
import './signal/back-click-event.js';
import './signal/register-service-worker-command.js';
import './signal/sw-user-notify.js';

/**
* Alwatr Root Base Element
Expand Down
1 change: 0 additions & 1 deletion ui/ui-kit/src/button/button.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {css, customElement, html} from '@alwatr/element';

import '@alwatr/icon';

import {AlwatrSurface} from '../card/surface.js';
Expand Down
3 changes: 1 addition & 2 deletions ui/ui-kit/src/button/icon-button.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {css, customElement, html, property, type PropertyValues} from '@alwatr/element';
import '@alwatr/icon';
import {eventTrigger} from '@alwatr/signal';

import {AlwatrSurface} from '../card/surface.js';

import type {StringifyableRecord, ClickSignalType} from '@alwatr/type';

import '@alwatr/icon';

declare global {
interface HTMLElementTagNameMap {
'alwatr-icon-button': AlwatrStandardIconButton;
Expand Down
1 change: 0 additions & 1 deletion ui/ui-kit/src/card/icon-box.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {css, customElement, html, property, nothing, ifDefined, PropertyValues, when} from '@alwatr/element';

import '@alwatr/icon';

import {AlwatrSurface} from './surface.js';
Expand Down
5 changes: 3 additions & 2 deletions ui/ui-kit/src/card/image-box.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import {css, customElement, html, property, nothing, ifDefined, type PropertyValues} from '@alwatr/element';
import {StringifyableRecord} from '@alwatr/type';

import '@alwatr/icon';

import {AlwatrSurface} from './surface.js';

import type {StringifyableRecord} from '@alwatr/type';


declare global {
interface HTMLElementTagNameMap {
'alwatr-image-box': AlwatrImageBox;
Expand Down
1 change: 1 addition & 0 deletions ui/ui-kit/src/chat/chat-list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {AlwatrDummyElement, css, customElement, html, nothing, property} from '@alwatr/element';

import './chat-message.js';

import type {ChatStorage} from '@alwatr/type';
Expand Down
4 changes: 2 additions & 2 deletions ui/ui-kit/src/chat/chat-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
SignalMixin,
} from '@alwatr/element';

import type {ChatMessage} from '@alwatr/type';

import './chat-avatar.js';
import './chat-bubble.js';

import type {ChatMessage} from '@alwatr/type';

declare global {
interface HTMLElementTagNameMap {
'alwatr-chat-message': AlwatrChatMessage;
Expand Down
4 changes: 2 additions & 2 deletions ui/ui-kit/src/chat/chat.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {customElement, AlwatrSmartElement, css, html} from '@alwatr/element';

import type {ChatStorage} from '@alwatr/type';

import './chat-footer.js';
import './chat-list.js';

import type {ChatStorage} from '@alwatr/type';

declare global {
interface HTMLElementTagNameMap {
'alwatr-chat': AlwatrChat;
Expand Down
1 change: 1 addition & 0 deletions ui/ui-kit/src/snackbar/controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {createLogger} from '@alwatr/logger';
import {clamp} from '@alwatr/math';
import {commandHandler} from '@alwatr/signal';

import './element.js';

import type {SnackbarOptions, SnackbarResponse} from './type.js';
Expand Down
3 changes: 1 addition & 2 deletions ui/ui-kit/src/snackbar/element.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {html, css, customElement, property, when} from '@alwatr/element';
import {untilEvent} from '@alwatr/util';

import {AlwatrSurface} from '../card/surface.js';

import '../button/button.js';
import {AlwatrSurface} from '../card/surface.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
3 changes: 1 addition & 2 deletions ui/ui-kit/src/text-field/text-field.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {css, customElement, html, property, ifDefined, type PropertyValues} from '@alwatr/element';
import {UnicodeDigits} from '@alwatr/math';

import '@alwatr/icon';
import {UnicodeDigits} from '@alwatr/math';

import {AlwatrSurface} from '../card/surface.js';

Expand Down
3 changes: 1 addition & 2 deletions ui/ui-kit/src/top-app-bar/top-app-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import {
type PropertyValues,
} from '@alwatr/element';

import {AlwatrSurface} from '../card/surface.js';

import '../button/icon-button.js';
import {AlwatrSurface} from '../card/surface.js';

import type {IconButtonContent} from '../button/icon-button.js';
import type {StringifyableRecord} from '@alwatr/type';
Expand Down
9 changes: 4 additions & 5 deletions uniquely/com-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import {logger} from './lib/config.js';

import './route/home.js';
import './route/get-order-list.js';
import './route/get-product-list.js';
import './route/get-price-list.js';
import './route/put-order.js';
import './route/patch-product-list.js';
import './route/get-product-list.js';
import './route/home.js';
import './route/patch-price-list.js';
import './route/patch-product-list.js';
import './route/put-order.js';

logger.logOther('..:: Alwatr Customer Order Management API ::..');
5 changes: 2 additions & 3 deletions uniquely/com-pwa/src/alwatr-pwa.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {html, customElement} from '@alwatr/element';
import '@alwatr/font/vazirmatn.css';
import {AlwatrPwaElement} from '@alwatr/pwa-helper/pwa-element.js';

import '@alwatr/ui-kit/style/mobile-only.css';
import '@alwatr/ui-kit/style/theme/palette-85.css';
import '@alwatr/ui-kit/style/theme/color.css';
import '@alwatr/font/vazirmatn.css';
import '@alwatr/ui-kit/style/theme/palette-85.css';

import './director/index.js';

Expand Down
6 changes: 3 additions & 3 deletions uniquely/com-pwa/src/director/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './l18e-loader.js';
import './content-provider.js';
import './product-storage-context-provider.js';
import './user-context-provider.js';
import './l18e-loader.js';
import './order-storage-context-provider.js';
import './product-storage-context-provider.js';
import './submit-order-command-handler.js';
import './user-context-provider.js';
7 changes: 3 additions & 4 deletions uniquely/com-pwa/src/page-404.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import {customElement, AlwatrSmartElement, css, html, LocalizeMixin} from '@alwatr/element';
import {message} from '@alwatr/i18n';
import '@alwatr/ui-kit/card/icon-box.js';
import '@alwatr/ui-kit/top-app-bar/top-app-bar.js';

import './app-footer';
import {submitOrderCommandTrigger} from './context.js';

import type {IconBoxContent} from '@alwatr/ui-kit/card/icon-box.js';
import type {TopAppBarContent} from '@alwatr/ui-kit/top-app-bar/top-app-bar.js';

import '@alwatr/ui-kit/card/icon-box.js';
import '@alwatr/ui-kit/top-app-bar/top-app-bar.js';
import './app-footer';

declare global {
interface HTMLElementTagNameMap {
'alwatr-page-404': AlwatrPage404;
Expand Down
4 changes: 2 additions & 2 deletions uniquely/flight-finder-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {logger} from './config.js';
import './route/home.js';
import './route/job/put.js';
import './route/job/delete.js';
import './route/job/get.js';
import {logger} from './config.js';
import './route/job/put.js';

logger.logOther('..:: Alwatr Flight Finder Application API ::..');
9 changes: 5 additions & 4 deletions uniquely/flight-finder-pwa/src/alwatr-pwa.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import {customElement, html} from '@alwatr/element';
import {AlwatrPwaElement} from '@alwatr/element/pwa-element.js';
import {type RoutesConfig} from '@alwatr/router';
import {AlwatrPwaElement} from '@alwatr/pwa-helper/pwa-element.js';

import './component/ionic-components.js';
import './component/page-flight-finder.js';
import ionNormalize from './style/ionic.normalize.js';
import ionTheming from './style/ionic.theming.js';

import './component/page-flight-finder.js';
import './component/ionic-components.js';
import type {RoutesConfig} from '@alwatr/router';


declare global {
interface HTMLElementTagNameMap {
Expand Down
3 changes: 1 addition & 2 deletions uniquely/flight-finder-pwa/src/component/job-add-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ import {AlwatrSmartElement, customElement, css, html} from '@alwatr/element';
import {message, localeContextConsumer, number} from '@alwatr/i18n';
import {eventTrigger} from '@alwatr/signal';

import './ionic-components';
import {cityList} from '../city-list.js';
import ionNormalize from '../style/ionic.normalize.js';
import ionTheming from '../style/ionic.theming.js';

import type {NewJobDetail} from '../type.js';
import type {InputCustomEvent, SelectCustomEvent} from '@ionic/core';

import './ionic-components';

declare global {
interface HTMLElementTagNameMap {
'job-add-form': JobAddForm;
Expand Down
5 changes: 2 additions & 3 deletions uniquely/flight-finder-pwa/src/component/job-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@ import {
nothing,
} from '@alwatr/element';
import {message, number} from '@alwatr/i18n';
import '@alwatr/icon';
import {eventTrigger} from '@alwatr/signal';

import './ionic-components.js';
import {cityList} from '../city-list.js';
import ionNormalize from '../style/ionic.normalize.js';
import ionTheming from '../style/ionic.theming.js';

import type {Job, JobResult} from '@alwatr/type/flight-finder.js';

import '@alwatr/icon';
import './ionic-components.js';

declare global {
interface HTMLElementTagNameMap {
'job-item': JobItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import {message, number} from '@alwatr/i18n';
import {requestableContextConsumer} from '@alwatr/signal';
import {modalController} from '@ionic/core';

import './job-add-form.js';
import './job-item.js';
import ionNormalize from '../style/ionic.normalize.js';
import ionTheming from '../style/ionic.theming.js';

import type {AlwatrDocumentStorage} from '@alwatr/type';
import type {Job} from '@alwatr/type/flight-finder.js';

import './job-item.js';
import './job-add-form.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
Loading

0 comments on commit 49726cf

Please sign in to comment.