Skip to content
Open
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
16 changes: 16 additions & 0 deletions common/build/eslint-config-fluid/flat.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/

// ESM loader wrapper that uses jiti to load the TypeScript flat.mts file
import jiti from "jiti";
import { fileURLToPath } from "node:url";

const __filename = fileURLToPath(import.meta.url);
const jitiLoader = jiti(__filename, { interopDefault: true, esmResolve: true });

// Load and re-export everything from the .mts file
const config = jitiLoader("./flat.mts");

export const { recommended, strict, minimalDeprecated } = config;
8 changes: 7 additions & 1 deletion common/build/eslint-config-fluid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
},
"license": "MIT",
"author": "Microsoft and contributors",
"exports": {
".": "./index.js",
"./*": "./*",
"./flat.mts": "./flat.mjs"
},
"main": "index.js",
"scripts": {
"build": "npm run print-configs && npm run prettier",
Expand Down Expand Up @@ -41,7 +46,8 @@
"eslint-plugin-react-hooks": "~7.0.1",
"eslint-plugin-tsdoc": "~0.5.0",
"eslint-plugin-unicorn": "~54.0.0",
"eslint-plugin-unused-imports": "~4.3.0"
"eslint-plugin-unused-imports": "~4.3.0",
"jiti": "^2.6.1"
},
"devDependencies": {
"@fluidframework/build-common": "^2.0.3",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading