-
Notifications
You must be signed in to change notification settings - Fork 93
/
eslint.config.js
59 lines (58 loc) · 1.52 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const sdl = require("@microsoft/eslint-plugin-sdl");
const rnx = require("@rnx-kit/eslint-plugin");
const wdio = require("eslint-plugin-wdio");
module.exports = [
...sdl.configs.recommended,
wdio.configs["flat/recommended"],
...rnx.configs.strict,
{
ignores: ["!.yarn"],
plugins: {
local: require("./scripts/eslint/plugin"),
},
rules: {
"local/no-process-exit": "error",
"no-restricted-exports": [
"error",
{
restrictDefaultExports: {
direct: true,
named: true,
defaultFrom: true,
namedFrom: true,
namespaceFrom: true,
},
},
],
},
},
{
files: [
"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",
],
rules: {
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["[a-z]*", "!../**", "!./**", "!node:*", "!node:*/**"],
message:
"External dependencies are not allowed in this file because it needs to be runnable before install.",
},
],
},
],
},
},
];