Skip to content

Commit

Permalink
use azsdkEslint.config helper in eslint.config.mjs (#2949)
Browse files Browse the repository at this point in the history
* use `azsdkEslint.config` helper

This is a follow-up of JS repo PR Azure/azure-sdk-for-js#32073

* update baselines

* update baseline

* remove excess files

---------

Co-authored-by: Jiao Di (MSFT) <[email protected]>
  • Loading branch information
jeremymeng and v-jiaodi authored Dec 19, 2024
1 parent 9e1b744 commit 90519cf
Show file tree
Hide file tree
Showing 50 changed files with 100 additions and 167 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -11,4 +10,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
10 changes: 4 additions & 6 deletions packages/rlc-common/src/metadata/buildESLintConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { RLCModel } from "../interfaces.js";

const eslintConfig = `import azsdkEslint from "@azure/eslint-plugin-azure-sdk";
export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -17,13 +16,12 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
`;

const esLintConfigEsm = `import azsdkEslint from "@azure/eslint-plugin-azure-sdk";
export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -36,7 +34,7 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
`;

export function buildEsLintConfig(model: RLCModel) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -14,4 +13,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
Expand All @@ -14,4 +13,4 @@ export default [
"tsdoc/syntax": "warn"
}
}
];
]);
Loading

0 comments on commit 90519cf

Please sign in to comment.