miaoda-expo-devkit 0.1.1-beta.56 → 0.1.1-beta.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -91,8 +91,43 @@ var KNOWN_CONFIG_PLUGIN_PACKAGES = /* @__PURE__ */ new Set([
|
|
|
91
91
|
"expo-web-browser",
|
|
92
92
|
"expo-widgets"
|
|
93
93
|
]);
|
|
94
|
+
var PACKAGES_WITHOUT_CONFIG_PLUGIN = /* @__PURE__ */ new Set([
|
|
95
|
+
"expo-age-range",
|
|
96
|
+
"expo-app-integrity",
|
|
97
|
+
"expo-application",
|
|
98
|
+
"expo-auth-session",
|
|
99
|
+
"expo-battery",
|
|
100
|
+
"expo-blur",
|
|
101
|
+
"expo-checkbox",
|
|
102
|
+
"expo-clipboard",
|
|
103
|
+
"expo-constants",
|
|
104
|
+
"expo-crypto",
|
|
105
|
+
"expo-device",
|
|
106
|
+
"expo-gl",
|
|
107
|
+
"expo-glass-effect",
|
|
108
|
+
"expo-haptics",
|
|
109
|
+
"expo-image-loader",
|
|
110
|
+
"expo-image-manipulator",
|
|
111
|
+
"expo-intent-launcher",
|
|
112
|
+
"expo-keep-awake",
|
|
113
|
+
"expo-linear-gradient",
|
|
114
|
+
"expo-linking",
|
|
115
|
+
"expo-live-photo",
|
|
116
|
+
"expo-mesh-gradient",
|
|
117
|
+
"expo-network",
|
|
118
|
+
"expo-print",
|
|
119
|
+
"expo-screen-capture",
|
|
120
|
+
"expo-sms",
|
|
121
|
+
"expo-status-bar",
|
|
122
|
+
"expo-speech",
|
|
123
|
+
"expo-store-review",
|
|
124
|
+
"expo-symbols",
|
|
125
|
+
"expo-ui",
|
|
126
|
+
"expo-video-thumbnails"
|
|
127
|
+
]);
|
|
94
128
|
var pluginsCache = /* @__PURE__ */ new Map();
|
|
95
129
|
var depsCache = /* @__PURE__ */ new Map();
|
|
130
|
+
var reportedRoots = /* @__PURE__ */ new Set();
|
|
96
131
|
function getPluginsFromAppJson(projectRoot) {
|
|
97
132
|
if (pluginsCache.has(projectRoot)) return pluginsCache.get(projectRoot);
|
|
98
133
|
const appJsonPath = import_node_path2.default.join(projectRoot, "app.json");
|
|
@@ -133,17 +168,24 @@ var noUnusedExpoPluginRule = {
|
|
|
133
168
|
},
|
|
134
169
|
schema: [],
|
|
135
170
|
messages: {
|
|
136
|
-
notInstalled: "'{{packageName}}' is declared in app.json \u2192 expo.plugins but is not installed in package.json."
|
|
171
|
+
notInstalled: "'{{packageName}}' is declared in app.json \u2192 expo.plugins but is not installed in package.json.",
|
|
172
|
+
noConfigPlugin: "'{{packageName}}' does not ship a config plugin (no app.plugin.js). Remove it from app.json \u2192 expo.plugins."
|
|
137
173
|
}
|
|
138
174
|
},
|
|
139
175
|
create(context) {
|
|
140
176
|
const projectRoot = findProjectRoot(context.filename);
|
|
141
177
|
if (!projectRoot) return {};
|
|
178
|
+
if (reportedRoots.has(projectRoot)) return {};
|
|
142
179
|
const declaredPlugins = getPluginsFromAppJson(projectRoot);
|
|
143
180
|
const installedDeps = getInstalledDeps(projectRoot);
|
|
144
181
|
return {
|
|
145
182
|
Program(node) {
|
|
183
|
+
reportedRoots.add(projectRoot);
|
|
146
184
|
for (const pkg of declaredPlugins) {
|
|
185
|
+
if (PACKAGES_WITHOUT_CONFIG_PLUGIN.has(pkg)) {
|
|
186
|
+
context.report({ node, messageId: "noConfigPlugin", data: { packageName: pkg } });
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
147
189
|
if (!KNOWN_CONFIG_PLUGIN_PACKAGES.has(pkg)) continue;
|
|
148
190
|
if (installedDeps.has(pkg)) continue;
|
|
149
191
|
context.report({
|
package/oxlint-config.json
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
{ "name": "expo-router-dynamic-tab", "specifier": "miaoda-expo-devkit/rules/no-unregistered-dynamic-tab-route" },
|
|
12
12
|
{ "name": "rn-pressable", "specifier": "miaoda-expo-devkit/rules/no-pressable-without-on-press" },
|
|
13
13
|
{ "name": "expo-video-compat", "specifier": "miaoda-expo-devkit/rules/no-expo-video-compat" },
|
|
14
|
-
{ "name": "rn-style", "specifier": "miaoda-expo-devkit/rules/no-inline-box-shadow-string" }
|
|
14
|
+
{ "name": "rn-style", "specifier": "miaoda-expo-devkit/rules/no-inline-box-shadow-string" },
|
|
15
|
+
{ "name": "expo-unused-config-plugin", "specifier": "miaoda-expo-devkit/rules/no-unused-expo-plugin" }
|
|
15
16
|
],
|
|
16
17
|
|
|
17
18
|
"categories": {
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"rn-pressable/no-pressable-without-on-press": "error",
|
|
30
31
|
"expo-video-compat/no-expo-video-compat": "warn",
|
|
31
32
|
"rn-style/no-inline-box-shadow-string": "error",
|
|
33
|
+
"expo-unused-config-plugin/no-unused-expo-plugin": "error",
|
|
32
34
|
|
|
33
35
|
"expo/no-dynamic-env-var": "error",
|
|
34
36
|
"expo/no-env-var-destructuring": "error",
|