From c33d70cfeafd8b5811e644708bb1a44524ec4b1e Mon Sep 17 00:00:00 2001 From: bordecal <6350017+bordecal@users.noreply.github.com> Date: Mon, 18 Jul 2022 11:49:18 -0400 Subject: [PATCH] Baseline for eslint-import-resolver-typescript timings --- .eslintrc.json | 14 ++++++++++++++ linting/timings.txt | 16 ++++++++++++++++ package.json | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 linting/timings.txt diff --git a/.eslintrc.json b/.eslintrc.json index 954eb0855a7b..f73b1776c008 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -38,12 +38,26 @@ ], 2 ], + "import/extensions": [ + "error", + "never", + { + "json": "always" + } + ], "import/first": "error", "import/newline-after-import": "error", "import/no-absolute-path": "error", "import/no-duplicates": "error", "import/no-extraneous-dependencies": ["off", { "devDependencies": false }], "import/no-unassigned-import": ["error", { "allow": ["symbol-observable"] }], + "import/no-unused-modules": [ + "error", + { + "missingExports": true, + "unusedExports": true + } + ], "import/order": [ "error", { diff --git a/linting/timings.txt b/linting/timings.txt new file mode 100644 index 000000000000..ee38670d9ac6 --- /dev/null +++ b/linting/timings.txt @@ -0,0 +1,16 @@ +Rule | Time (ms) | Relative +:-------------------------------------------|----------:|--------: +import/no-unused-modules | 16192.504 | 34.3% +@typescript-eslint/no-misused-promises | 12934.596 | 27.4% +@typescript-eslint/no-floating-promises | 6937.194 | 14.7% +import/order | 2205.970 | 4.7% +import/no-extraneous-dependencies | 2010.543 | 4.3% +import/no-duplicates | 1928.831 | 4.1% +import/extensions | 1304.148 | 2.8% +@typescript-eslint/no-unnecessary-qualifier | 975.010 | 2.1% +padding-line-between-statements | 502.669 | 1.1% +max-len | 199.775 | 0.4% + +real 1m21.717s +user 0m0.168s +sys 0m0.399s \ No newline at end of file diff --git a/package.json b/package.json index 89d5a6a613ea..eaeba5f3705c 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "build": "node ./bin/devkit-admin build", "build:bazel": "node ./bin/devkit-admin build-bazel", "build-tsc": "tsc -p tsconfig.json", - "lint": "eslint --cache --max-warnings=0 \"**/*.ts\"", + "lint": "eslint --max-warnings=0 \"**/*.ts\"", "ng-dev": "cross-env TS_NODE_PROJECT=$PWD/.ng-dev/tsconfig.json TS_NODE_TRANSPILE_ONLY=1 node --no-warnings --loader ts-node/esm node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs", "templates": "node ./bin/devkit-admin templates", "validate": "node ./bin/devkit-admin validate",