Skip to content

Commit

Permalink
Apply automated migration to eslint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremymeng committed Aug 22, 2024
1 parent 1764824 commit 4ab6590
Show file tree
Hide file tree
Showing 246 changed files with 1,044 additions and 921 deletions.
11 changes: 0 additions & 11 deletions sdk/agrifood/agrifood-farming-rest/.eslintrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/agrifood/agrifood-farming-rest/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn",
},
},
];
4 changes: 2 additions & 2 deletions sdk/agrifood/agrifood-farming-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"integration-test:browser": "karma start --single-run",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 \"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",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
Expand Down
14 changes: 0 additions & 14 deletions sdk/ai/ai-inference-rest/.eslintrc.json

This file was deleted.

17 changes: 17 additions & 0 deletions sdk/ai/ai-inference-rest/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn",
"@azure/azure-sdk/ts-package-json-module": "off",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
},
},
];
11 changes: 0 additions & 11 deletions sdk/anomalydetector/ai-anomaly-detector-rest/.eslintrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/anomalydetector/ai-anomaly-detector-rest/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn",
},
},
];
4 changes: 2 additions & 2 deletions sdk/anomalydetector/ai-anomaly-detector-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.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",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/github-source-headers": "off",
},
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"integration-test:browser": "echo skipped",
"integration-test:node": "dev-tool run test:vitest --no-test-proxy -- -coverage",
"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] --ignore-pattern templates",
"lint": "eslint package.json api-extractor.json src test --ext .ts --ignore-pattern templates",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion] --ignore-pattern templates",
"lint": "eslint package.json api-extractor.json src test --ignore-pattern templates",
"pack": "npm pack 2>&1",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"integration-test:browser": "npm run build:test && dev-tool run test:vitest --no-test-proxy --browser -- --coverage",
"integration-test:node": "dev-tool run test:vitest --no-test-proxy -- -coverage",
"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",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node",
Expand Down
2 changes: 1 addition & 1 deletion sdk/appcontainers/arm-appcontainers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview"
}
}
}
11 changes: 0 additions & 11 deletions sdk/appservice/arm-appservice-rest/.eslintrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/appservice/arm-appservice-rest/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn",
},
},
];
4 changes: 2 additions & 2 deletions sdk/appservice/arm-appservice-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.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",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
Expand Down
4 changes: 2 additions & 2 deletions sdk/attestation/attestation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 --exclude 'dist-esm/test/**/browser/*.spec.js' 'dist-esm/test/**/*.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",
"test:browser": "npm run build:test && npm run integration-test:browser",
"test:node": "npm run build:test && npm run integration-test:node",
Expand Down
11 changes: 0 additions & 11 deletions sdk/batch/batch-rest/.eslintrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/batch/batch-rest/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn",
},
},
];
4 changes: 2 additions & 2 deletions sdk/batch/batch-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"integration-test:node": "echo skipped",
"generate:client": "echo skipped",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"build:test": "npm run clean && tshy && dev-tool run build-test",
"build": "npm run clean && tshy && mkdirp ./review && api-extractor run --local",
Expand Down
4 changes: 2 additions & 2 deletions sdk/cognitivelanguage/ai-language-conversations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 \"dist-esm/test/**/*.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",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
Expand Down
4 changes: 2 additions & 2 deletions sdk/cognitivelanguage/ai-language-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 \"dist-esm/test/**/*.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",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
Expand Down
11 changes: 0 additions & 11 deletions sdk/cognitivelanguage/ai-language-textauthoring/.eslintrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/cognitivelanguage/ai-language-textauthoring/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn",
},
},
];
4 changes: 2 additions & 2 deletions sdk/cognitivelanguage/ai-language-textauthoring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test": "echo skipped",
"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",
"test:browser": "echo skipped",
"test:node": "echo skipped",
Expand Down
4 changes: 2 additions & 2 deletions sdk/communication/communication-alpha-ids/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 300000 'dist-esm/test/**/*.spec.js'",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js",
"lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json README.md src test",
"pack": "npm pack 2>&1",
"test": "rimraf --glob dist-test && npm run build:test && npm run unit-test && npm run integration-test",
"test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
Expand Down

This file was deleted.

11 changes: 11 additions & 0 deletions sdk/communication/communication-call-automation/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
// Removing `src` would be a breaking change so leaving it for the package owners to address
"@azure/azure-sdk/ts-package-json-files-required": "warn",
},
},
];
4 changes: 2 additions & 2 deletions sdk/communication/communication-call-automation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"integration-test:browser": "echo skipped",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js",
"lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json README.md src test",
"pack": "npm pack 2>&1",
"test:browser": "npm run build:test && npm run unit-test:browser",
"test:node": "npm run build:test && npm run unit-test:node",
Expand Down
8 changes: 0 additions & 8 deletions sdk/communication/communication-chat/.eslintrc.json

This file was deleted.

11 changes: 11 additions & 0 deletions sdk/communication/communication-chat/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
// Removing `src` would be a breaking change so leaving it for the package owners to address
"@azure/azure-sdk/ts-package-json-files-required": "warn",
},
},
];
4 changes: 2 additions & 2 deletions sdk/communication/communication-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js",
"lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json README.md src test",
"pack": "npm pack 2>&1",
"test:browser": "npm run build:test && npm run unit-test:browser",
"test:node": "npm run build:test && npm run unit-test:node",
Expand Down
Loading

0 comments on commit 4ab6590

Please sign in to comment.