2024-10-09 15:50:09 +03:00
|
|
|
const sdl = require("@microsoft/eslint-plugin-sdl");
|
2023-11-24 17:36:24 +03:00
|
|
|
const rnx = require("@rnx-kit/eslint-plugin");
|
2024-06-03 14:30:44 +03:00
|
|
|
const wdio = require("eslint-plugin-wdio");
|
2023-10-23 19:17:16 +03:00
|
|
|
|
|
|
|
module.exports = [
|
2024-10-09 15:50:09 +03:00
|
|
|
...sdl.configs.recommended,
|
2024-06-03 14:30:44 +03:00
|
|
|
wdio.configs["flat/recommended"],
|
2023-11-24 17:36:24 +03:00
|
|
|
...rnx.configs.strict,
|
2023-10-23 19:17:16 +03:00
|
|
|
{
|
|
|
|
ignores: ["!.yarn"],
|
|
|
|
plugins: {
|
|
|
|
local: require("./scripts/eslint/plugin"),
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
"local/no-process-exit": "error",
|
2023-11-01 19:44:12 +03:00
|
|
|
"no-restricted-exports": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
restrictDefaultExports: {
|
|
|
|
direct: true,
|
|
|
|
named: true,
|
|
|
|
defaultFrom: true,
|
|
|
|
namedFrom: true,
|
|
|
|
namespaceFrom: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2023-10-23 19:17:16 +03:00
|
|
|
},
|
|
|
|
},
|
2024-01-04 18:46:07 +03:00
|
|
|
{
|
2024-01-10 19:16:25 +03:00
|
|
|
files: [
|
2024-08-21 17:44:25 +03:00
|
|
|
"scripts/internal/generate-manifest-docs.mjs",
|
|
|
|
"scripts/internal/generate-manifest.mjs",
|
|
|
|
"scripts/internal/generate-schema.mjs",
|
|
|
|
"scripts/internal/pack.mjs",
|
|
|
|
"scripts/internal/set-react-version.mjs",
|
|
|
|
"scripts/internal/test.mjs",
|
|
|
|
"scripts/schema.mjs",
|
|
|
|
"scripts/testing/test-apple.mjs",
|
|
|
|
"scripts/testing/test-e2e.mjs",
|
|
|
|
"scripts/testing/test-matrix.mjs",
|
|
|
|
"scripts/utils/colors.mjs",
|
2024-01-10 19:16:25 +03:00
|
|
|
],
|
2024-01-04 18:46:07 +03:00
|
|
|
rules: {
|
|
|
|
"no-restricted-imports": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
patterns: [
|
|
|
|
{
|
2024-08-21 17:44:25 +03:00
|
|
|
group: ["[a-z]*", "!../**", "!./**", "!node:*", "!node:*/**"],
|
2024-01-04 18:46:07 +03:00
|
|
|
message:
|
|
|
|
"External dependencies are not allowed in this file because it needs to be runnable before install.",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2023-10-23 19:17:16 +03:00
|
|
|
];
|