forked from microsoft/react-native-test-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
65 lines (63 loc) · 1.68 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
60
61
62
63
64
65
const { FlatCompat } = require("@eslint/eslintrc");
const js = require("@eslint/js");
const rnx = require("@rnx-kit/eslint-plugin");
const wdio = require("eslint-plugin-wdio");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});
module.exports = [
...compat.extends("plugin:@microsoft/sdl/required"),
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.",
},
],
},
],
},
},
];