Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linter] Update files with respect to sort-imports rule #18567

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion common/tools/eslint-plugin-azure-sdk/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"no-multi-spaces": "error",
"no-redeclare": "error",
"no-useless-escape": "off",
"prefer-template": "error"
"prefer-template": "error",
"sort-imports": "error"
}
}
3 changes: 2 additions & 1 deletion common/tools/eslint-plugin-azure-sdk/src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export = {
"@azure/azure-sdk/ts-no-const-enums": "warn",
"@azure/azure-sdk/ts-no-namespaces": "error",
"@azure/azure-sdk/ts-no-window": "error",
"@azure/azure-sdk/ts-package-json-sdktype": "error",
"@azure/azure-sdk/ts-package-json-author": "error",
"@azure/azure-sdk/ts-package-json-bugs": "error",
"@azure/azure-sdk/ts-package-json-engine-is-present": "error",
Expand All @@ -61,6 +60,8 @@ export = {
"@azure/azure-sdk/ts-package-json-name": "error",
"@azure/azure-sdk/ts-package-json-repo": "error",
"@azure/azure-sdk/ts-package-json-required-scripts": "error",
"@azure/azure-sdk/ts-package-json-sdktype": "error",
"@azure/azure-sdk/ts-package-json-sdktype-exists": "error",
"@azure/azure-sdk/ts-package-json-sideeffects": "error",
"@azure/azure-sdk/ts-package-json-types": "error",
"@azure/azure-sdk/ts-pagination-list": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { Comment, Node } from "estree";
import { Rule } from "eslint";
import { getRuleMetaData } from "../utils";

//------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion common/tools/eslint-plugin-azure-sdk/src/rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import tsNoConstEnums from "./ts-no-const-enums";
import tsNoNamespaces from "./ts-no-namespaces";
import tsNoWindow from "./ts-no-window";
import tsPackageJsonAuthor from "./ts-package-json-author";
import tsPackageJsonSdkType from "./ts-package-json-sdktype";
import tsPackageJsonBugs from "./ts-package-json-bugs";
import tsPackageJsonEngineIsPresent from "./ts-package-json-engine-is-present";
import tsPackageJsonFilesRequired from "./ts-package-json-files-required";
Expand All @@ -45,6 +44,8 @@ import tsPackageJsonModule from "./ts-package-json-module";
import tsPackageJsonName from "./ts-package-json-name";
import tsPackageJsonRepo from "./ts-package-json-repo";
import tsPackageJsonRequiredScripts from "./ts-package-json-required-scripts";
import tsPackageJsonSdkType from "./ts-package-json-sdktype";
import tsPackageJsonSdkTypeExists from "./ts-package-json-sdktype-exists";
import tsPackageJsonSideEffects from "./ts-package-json-sideeffects";
import tsPackageJsonTypes from "./ts-package-json-types";
import tsPaginationList from "./ts-pagination-list";
Expand Down Expand Up @@ -95,6 +96,7 @@ export = {
"ts-package-json-name": tsPackageJsonName,
"ts-package-json-repo": tsPackageJsonRepo,
"ts-package-json-required-scripts": tsPackageJsonRequiredScripts,
"ts-package-json-sdktype-exists": tsPackageJsonSdkTypeExists,
"ts-package-json-sideeffects": tsPackageJsonSideEffects,
"ts-package-json-types": tsPackageJsonTypes,
"ts-pagination-list": tsPaginationList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* @author Will Temple
*/

import { Rule } from "eslint";
import { Property } from "estree";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Property } from "estree";
import { Rule } from "eslint";
import { stripFileName } from "../utils/verifiers";

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { ClassDeclaration, Identifier, MethodDefinition } from "estree";
import { getPublicMethods, getRuleMetaData } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @author Arpan Laha
*/

import { ParserServices, TSESTree } from "@typescript-eslint/experimental-utils";
import { ParserWeakMapESTreeToTSNode } from "@typescript-eslint/typescript-estree/dist/parser-options";
import { Rule } from "eslint";
import { ClassDeclaration, Identifier, MethodDefinition } from "estree";
import { ParserServices, TSESTree } from "@typescript-eslint/experimental-utils";
import { Symbol as TSSymbol, Type, TypeChecker, TypeFlags } from "typescript";
import { getPublicMethods, getRuleMetaData } from "../utils";
import { ParserWeakMapESTreeToTSNode } from "@typescript-eslint/typescript-estree/dist/parser-options";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @author Arpan Laha
*/

"use strict";

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

"use strict";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { ArrayExpression, Property } from "estree";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { Literal, Property } from "estree";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { Property } from "estree";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Property } from "estree";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { Property } from "estree";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Property } from "estree";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*/

import { ParserServices, TSESTree } from "@typescript-eslint/experimental-utils";
import { getLocalExports, getRuleMetaData } from "../utils";
import { Node } from "estree";
import { ParserWeakMapESTreeToTSNode } from "@typescript-eslint/typescript-estree/dist/parser-options";
import { Rule } from "eslint";
import { Node } from "estree";
import { readFileSync } from "fs";
import { TypeChecker } from "typescript";
import { sync as globSync } from "glob";
import { readFileSync } from "fs";
import { relative } from "path";
import { TypeChecker } from "typescript";
import { getLocalExports, getRuleMetaData } from "../utils";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Identifier, NewExpression, ThrowStatement } from "estree";
import { ParserServices, TSESTree } from "@typescript-eslint/experimental-utils";
import { Rule } from "eslint";
import { Identifier, NewExpression, ThrowStatement } from "estree";
import { getRuleMetaData } from "../utils";

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { ExportDefaultDeclaration } from "estree";
import { normalize, relative } from "path";
import { ExportDefaultDeclaration } from "estree";
import { Rule } from "eslint";
import { getRuleMetaData } from "../utils";

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @author Arpan Laha
*/

import { TSESTree } from "@typescript-eslint/experimental-utils";
import { Rule } from "eslint";
import { ClassDeclaration, Identifier, MethodDefinition } from "estree";
import { getPublicMethods, getRuleMetaData } from "../utils";
import { Rule } from "eslint";
import { TSESTree } from "@typescript-eslint/experimental-utils";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @author Arpan Laha
*/

import { ParserServices, TSESTree } from "@typescript-eslint/experimental-utils";
import { Rule } from "eslint";
import { ClassDeclaration, Identifier, MethodDefinition } from "estree";
import { ParserServices, TSESTree } from "@typescript-eslint/experimental-utils";
import { getPublicMethods, getRuleMetaData } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @author Arpan Laha
*/

import { TSESTree } from "@typescript-eslint/experimental-utils";
import { Rule } from "eslint";
import { ClassDeclaration, Identifier, MethodDefinition } from "estree";
import { getPublicMethods, getRuleMetaData } from "../utils";
import { Rule } from "eslint";
import { TSESTree } from "@typescript-eslint/experimental-utils";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

/**
* definition of LTS Node versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Arpan Laha
*/

import { Rule } from "eslint";
import { Literal, Property } from "estree";
import { arrayToString, getRuleMetaData, getVerifiers, stripPath } from "../utils";
import { Rule } from "eslint";

//------------------------------------------------------------------------------
// Rule Definition
Expand Down
Loading