Skip to content

Commit

Permalink
Add a distinct group for @material/... imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Apr 22, 2024
1 parent ec7abe1 commit c1f0362
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 25 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
"external",
"internal"
],
"pathGroups": [
{
"pattern": "@material/**",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["@material/**"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
Expand Down
5 changes: 1 addition & 4 deletions client/src/www/app/cordova_main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,16 @@
import '@babel/polyfill';
import 'web-animations-js/web-animations-next-lite.min.js';
import '@webcomponents/webcomponentsjs/webcomponents-bundle.js';

import {setRootPath} from '@polymer/polymer/lib/utils/settings.js';
setRootPath(location.pathname.substring(0, location.pathname.lastIndexOf('/') + 1));

import * as Sentry from '@sentry/browser';

import {AbstractClipboard} from './clipboard';
import {EnvironmentVariables} from './environment';
import {FakeOutlineTunnel} from './fake_tunnel';
import {main} from './main';
import {OutlinePlatform} from './platform';
import {Tunnel, TunnelStatus} from './tunnel';
import {ShadowsocksSessionConfig} from './tunnel';
import {Tunnel, TunnelStatus,ShadowsocksSessionConfig} from './tunnel';
import {AbstractUpdater} from './updater';
import * as interceptors from './url_interceptor';
import {NoOpVpnInstaller, VpnInstaller} from './vpn_installer';
Expand Down
1 change: 1 addition & 0 deletions client/src/www/views/contact_view/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import {ListItemBase} from '@material/mwc-list/mwc-list-item-base';
import {Select} from '@material/mwc-select';

import {fixture, html, nextFrame, oneEvent} from '@open-wc/testing';

import {ContactView} from './index';
Expand Down
8 changes: 4 additions & 4 deletions client/src/www/views/contact_view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
* limitations under the License.
*/


import {SingleSelectedEvent} from '@material/mwc-list/mwc-list';
import {Radio} from '@material/mwc-radio';

import {html, css, LitElement, TemplateResult, nothing} from 'lit';
import {customElement, property, state} from 'lit/decorators.js';
import {Ref, createRef, ref} from 'lit/directives/ref.js';
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
import '@material/mwc-circular-progress';
import '@material/mwc-radio';
import '@material/mwc-select';
import '@material/mwc-formfield';
import {Radio} from '@material/mwc-radio';
import {SingleSelectedEvent} from '@material/mwc-list/mwc-list';

import './support_form';
import {AppType} from './app_type';
import {IssueType, UNSUPPORTED_ISSUE_TYPE_HELPPAGES} from './issue_type';
import {FormValues, SupportForm, ValidFormValues} from './support_form';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

import {TextField} from '@material/mwc-textfield';

import {fixture, html, nextFrame, oneEvent, triggerBlurFor, triggerFocusFor} from '@open-wc/testing';

import {FormValues, SupportForm} from './index';
Expand Down
12 changes: 6 additions & 6 deletions client/src/www/views/contact_view/support_form/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
* limitations under the License.
*/

import {SelectedDetail} from '@material/mwc-menu/mwc-menu-base';
import {TextField} from '@material/mwc-textfield';
import '@material/mwc-button';
import '@material/mwc-select';
import '@material/mwc-textarea';

import {html, css, LitElement, TemplateResult, nothing, PropertyValues} from 'lit';
import {customElement, property, state} from 'lit/decorators.js';
import {live} from 'lit/directives/live.js';
import {createRef, Ref, ref} from 'lit/directives/ref.js';

import '@material/mwc-button';
import '@material/mwc-select';
import '@material/mwc-textarea';
import '@material/mwc-textfield';
import {Localizer} from '../../../../../infrastructure/i18n';
import {AppType} from '../app_type';

import {TextField} from '@material/mwc-textfield';
import {SelectedDetail} from '@material/mwc-menu/mwc-menu-base';

type FormControl = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;

Expand Down
1 change: 0 additions & 1 deletion client/src/www/views/contact_view/support_form/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import {html} from 'lit';

import './index';
import {FormValues} from './index';
import {localize} from '../../../testing/localize';
import {AppType} from '../app_type';
Expand Down
7 changes: 3 additions & 4 deletions client/src/www/views/servers_view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
limitations under the License.
*/

import '@material/mwc-button';

import {css, html, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';
import { DirectiveResult } from 'lit/directive';
import {unsafeHTML, UnsafeHTMLDirective} from 'lit/directives/unsafe-html.js';

import '@material/mwc-button';
import './server_connection_indicator';
import './server_list';

import {ServerConnectionState as _ServerConnectionState} from './server_connection_indicator';
import './server_list';
import {ServerListItem as _ServerListItem} from './server_list_item';
import { Localizer } from '../../../../infrastructure/i18n';

Expand Down
2 changes: 0 additions & 2 deletions client/src/www/views/servers_view/server_list/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
limitations under the License.
*/

import './index';

import {html} from 'lit';

import {ServerList} from './index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

import {Menu} from '@material/mwc-menu';

import {Ref} from 'lit/directives/ref';

import {Localizer} from '../../../../../infrastructure/i18n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@

import '@material/mwc-button';
import '@material/mwc-icon-button';
import '@material/mwc-menu';
import '../../server_connection_indicator';

import {Menu} from '@material/mwc-menu';

import {css, html, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';
import {createRef, Ref, ref} from 'lit/directives/ref.js';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "npm run clean --workspaces && rm -rf output node_modules third_party/jsign/*.jar && go run github.com/go-task/task/v3/cmd/task clean",
"format:all": "prettier --write \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
"format": "pretty-quick --staged --pattern \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
"lint:ts": "eslint --ext ts,mjs client/src",
"lint:ts": "eslint --ext ts,mjs client",
"lint": "npm run lint:ts",
"reset": "npm run clean && npm ci"
},
Expand Down

0 comments on commit c1f0362

Please sign in to comment.