Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use azsdkEslint.config helper in eslint.config.mjs #2949

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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([
MaryGao marked this conversation as resolved.
Show resolved Hide resolved
{
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
Loading