-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eslint] fix linting issues for several packages (#30826)
These would appear once we moved to eslint flat config. They are not detected currently likely due to incorrect configurations. - Remove TextEncoder/TextDecoder declarations as they are in global scope on our supported platforms - Remove URL imports as they are in global scope on our supported platforms. - remove --ext from linting NPM scripts - Fix issues linting README.md files - Suppress error about crypto. The feature of adding it to global scope is still experimental - Fix build error in attestation. Neither browsers nor NodeJS has a constructor parameter for TextEncoder - https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/TextEncoder - https://nodejs.org/docs/latest-v18.x/api/util.html#class-utiltextencoder
- Loading branch information
1 parent
1294859
commit 6ea3729
Showing
20 changed files
with
69 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
sdk/contentsafety/ai-content-safety-rest/eslint.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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", | ||
"@typescript-eslint/no-redeclare": "warn", | ||
"tsdoc/syntax": "warn", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; | ||
|
||
export default [ | ||
...azsdkEslint.configs.recommended, | ||
{ | ||
rules: { | ||
"@typescript-eslint/no-this-alias": "off", | ||
"@azure/azure-sdk/ts-package-json-module": "warn", | ||
"@typescript-eslint/no-redeclare": "warn", | ||
"no-use-before-define": "warn", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; | ||
|
||
export default [ | ||
{ | ||
ignores: ["src/shims.d.ts"], | ||
}, | ||
...azsdkEslint.configs.recommended, | ||
{ | ||
files: ["samples-dev/**/*.ts"], | ||
rules: { | ||
// Suppresses errors for the custom TSDoc syntax we use for docs | ||
"tsdoc/syntax": "off", | ||
// Suppresses spurious missing dependency error as ESLint thinks the sample's runtime deps | ||
// should be runtime deps for us too | ||
"import/no-extraneous-dependencies": "off", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.