Skip to content

Commit

Permalink
[engsys] upgrade dev dependency eslint to v9
Browse files Browse the repository at this point in the history
***NO_CI***

- bump eslint version to ^9.9.0
- [eslint-plugin] remove eslint-plugin-import for now. Will re-visit until it supports eslint v9
  • Loading branch information
jeremymeng committed Aug 23, 2024
1 parent cf8bd3d commit 5adb09d
Show file tree
Hide file tree
Showing 185 changed files with 861 additions and 617 deletions.
1,075 changes: 676 additions & 399 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common/tools/dev-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"autorest": "^3.7.1",
"builtin-modules": "^3.1.0",
"cross-env": "^7.0.3",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.5",
"typescript-eslint": "~8.2.0",
Expand Down
5 changes: 2 additions & 3 deletions common/tools/eslint-plugin-azure-sdk-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "~8.2.0",
"@typescript-eslint/parser": "~8.2.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.22.1",
"eslint": "^9.9.0",
"eslint-plugin-n": "^17.10.1",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-promise": "^6.0.0",
Expand All @@ -20,7 +19,7 @@
"@eslint/compat": "^1.0.1",
"@eslint/js": "~9.2.0",
"@typescript-eslint/typescript-estree": "~8.2.0",
"@types/eslint": "~8.56.10",
"@types/eslint": "^9.6.0",
"@types/estree": "~1.0.0",
"@typescript-eslint/utils": "~8.2.0",
"eslint-config-prettier": "^9.0.0",
Expand Down
9 changes: 4 additions & 5 deletions common/tools/eslint-plugin-azure-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
"@eslint/eslintrc": "^3.0.2",
"@typescript-eslint/eslint-plugin": "~8.2.0",
"@typescript-eslint/parser": "~8.2.0",
"eslint": "^8.50.0",
"eslint-plugin-import": "^2.22.1",
"eslint": "^9.9.0",
"eslint-plugin-n": "^17.10.1",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-promise": "^6.0.0",
Expand All @@ -76,7 +75,7 @@
"@eslint/compat": "^1.0.1",
"@eslint/js": "~9.2.0",
"@typescript-eslint/typescript-estree": "~8.2.0",
"@types/eslint": "~8.56.10",
"@types/eslint": "^9.6.0",
"@types/estree": "~1.0.0",
"eslint-config-prettier": "^9.0.0",
"glob": "^10.3.10",
Expand All @@ -94,12 +93,12 @@
"@typescript-eslint/rule-tester": "~8.2.0",
"@vitest/coverage-istanbul": "^1.4.0",
"cross-env": "^7.0.3",
"eslint": "^8.50.0",
"eslint": "^9.9.0",
"eslint-plugin-markdown": "^5.0.0",
"prettier": "^3.3.3",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
"vitest": "^1.4.0",
"@types/eslint": "~8.56.10"
"@types/eslint": "^9.6.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ export default {
curly: ["error", "multi-line"],
"eol-last": ["error", "always"],
eqeqeq: ["error", "always", { null: "ignore" }],
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: ["test/**/*.ts", "samples/**", "**/karma.conf.js", "**/.eslintrc.js"],
optionalDependencies: false,
peerDependencies: false,
},
],
"no-console": "off",
"no-dupe-class-members": "off",
"no-invalid-this": "off",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { fixupPluginRules } from "@eslint/compat";
import n from "eslint-plugin-n";
import noOnlyTests from "eslint-plugin-no-only-tests";
import tsdoc from "eslint-plugin-tsdoc";
import { rules as importRules } from "eslint-plugin-import";

const tsEslintCustomization: Record<string, SharedConfig.RuleEntry> = {
"@typescript-eslint/no-invalid-this": "off",
Expand Down Expand Up @@ -157,16 +156,6 @@ const tsdocCustomization = {
},
};

const importCustomization = {
name: "import-azsdk-customized",
plugins: {
import: fixupPluginRules({ rules: importRules }),
},
rules: {
"import/no-extraneous-dependencies": "error",
},
};

const rules: Record<string, SharedConfig.RuleEntry> = {
...tsEslintCustomization,
...azsdkDefault,
Expand Down Expand Up @@ -212,5 +201,4 @@ export default (parser: FlatConfig.Parser): FlatConfig.ConfigArray => [
nOffForBrowser,
noOnlyTestsCustomization as FlatConfig.Config,
tsdocCustomization as FlatConfig.Config,
importCustomization as FlatConfig.Config,
];
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const examplePackageGood = `{
"cross-env": "^7.0.2",
"debug": "^4.1.1",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"esm": "^3.2.18",
"https-proxy-agent": "^5.0.0",
"karma": "^6.2.0",
Expand Down Expand Up @@ -291,7 +291,7 @@ const examplePackageBad = `{
"cross-env": "^7.0.2",
"debug": "^4.1.1",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"esm": "^3.2.18",
"https-proxy-agent": "^5.0.0",
"karma": "^6.2.0",
Expand Down
2 changes: 1 addition & 1 deletion common/tools/vite-plugin-browser-test-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"devDependencies": {
"@eslint/js": "~9.2.0",
"@types/node": "^18.0.0",
"eslint": "^8.50.0",
"eslint": "^9.9.0",
"prettier": "^3.3.3",
"rimraf": "^5.0.0",
"typescript-eslint": "~8.2.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/agrifood/agrifood-farming-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
"karma-env-preprocessor": "^0.1.1",
Expand Down
2 changes: 1 addition & 1 deletion sdk/anomalydetector/ai-anomaly-detector-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"autorest": "latest",
"@types/node": "^18.0.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@types/yargs": "^17.0.32",
"@types/yargs-parser": "^21.0.3",
"@vitest/coverage-istanbul": "^2.0.5",
"eslint": "^8.57.0",
"eslint": "^9.9.0",
"magic-string": "^0.30.8",
"prettier": "^3.3.3",
"rimraf": "^5.0.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@types/node": "^18.0.0",
"@vitest/browser": "^2.0.5",
"@vitest/coverage-istanbul": "^2.0.5",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"playwright": "^1.42.1",
"rimraf": "^5.0.5",
"tshy": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/appconfiguration/app-configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"nyc": "^17.0.0",
"chai": "^4.2.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@types/node": "^18.0.0",
"cross-env": "^7.0.2",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"rimraf": "^5.0.5",
"tslib": "^2.2.0",
"ts-node": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/appservice/arm-appservice-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"autorest": "latest",
"@types/node": "^18.0.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
Expand Down
2 changes: 1 addition & 1 deletion sdk/attestation/attestation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/batch/batch-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"dotenv": "^16.0.0",
"@microsoft/api-extractor": "^7.40.3",
"@types/node": "^18.0.0",
"eslint": "^8.55.0",
"eslint": "^9.9.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"mkdirp": "^2.1.2",
Expand Down
1 change: 0 additions & 1 deletion sdk/batch/batch-rest/test/jobSchedules.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from "../src/index.js";
import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js";
import { getResourceName } from "./utils/helpers.js";
// eslint-disable-next-line import/no-extraneous-dependencies
import moment from "moment";
import { describe, it, beforeAll, afterAll, beforeEach, afterEach, assert } from "vitest";

Expand Down
1 change: 0 additions & 1 deletion sdk/batch/batch-rest/test/poolScaling.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from "../src/index.js";
import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js";
import { getResourceName, waitForNotNull } from "./utils/helpers.js";
// eslint-disable-next-line import/no-extraneous-dependencies
import moment from "moment";
import { describe, it, beforeAll, afterAll, beforeEach, afterEach, assert } from "vitest";

Expand Down
1 change: 0 additions & 1 deletion sdk/batch/batch-rest/test/utils/recordedClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
// AzureCliCredential,
InteractiveBrowserCredential,
} from "@azure/identity";
// eslint-disable-next-line import/no-extraneous-dependencies
import { isNode } from "@azure-tools/test-utils";
import { NoOpCredential } from "@azure-tools/test-credential";
import { AzureNamedKeyCredential } from "@azure/core-auth";
Expand Down
6 changes: 3 additions & 3 deletions sdk/batch/batch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.3",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"karma": "^6.3.4",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
Expand Down Expand Up @@ -92,8 +92,8 @@
"integration-test:browser": "karma start --single-run",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 --full-trace \"dist-esm/test/{,!(browser)/**/}/*.spec.js\"",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test",
"pack": "npm pack 2>&1",
"prepack": "npm install && npm run build",
"test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/cognitivelanguage/ai-language-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"autorest": "latest",
"@types/node": "^18.0.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@types/node": "^18.0.0",
"cross-env": "^7.0.2",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"rimraf": "^5.0.5",
"tslib": "^2.2.0",
"ts-node": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-alpha-ids/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"chai-as-promised": "^7.1.1",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@types/node": "^18.0.0",
"nyc": "^17.0.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.0",
"source-map-support": "^0.5.9",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-job-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-messages-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"autorest": "latest",
"@types/node": "^18.0.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.0",
"source-map-support": "^0.5.9",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-phone-numbers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^9.9.0",
"inherits": "^2.0.3",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
Expand Down
Loading

0 comments on commit 5adb09d

Please sign in to comment.