rulint 1.1.1 → 1.1.2
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.
- package/dist/main.js +17 -19
- package/dist/main.mjs +17 -19
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -213,25 +213,23 @@ var rulint = (options = RulintOptionsDefault) => {
|
|
|
213
213
|
options = (0, import_lodash.default)({}, RulintOptionsDefault, options);
|
|
214
214
|
if (options.append?.["no-restricted-imports"] && typeof options.js?.rules?.["no-restricted-imports"] === "object") options.js.rules["no-restricted-imports"] = [...options.js.rules["no-restricted-imports"], ...options.append["no-restricted-imports"]];
|
|
215
215
|
if (options.append?.["no-restricted-syntax"] && typeof options.js?.rules?.["no-restricted-syntax"] === "object") options.js.rules["no-restricted-syntax"] = [...options.js.rules["no-restricted-syntax"], ...options.append["no-restricted-syntax"]];
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
];
|
|
234
|
-
} else return [{ ignores: options.ignores }, ...options.configs ?? []];
|
|
216
|
+
return [
|
|
217
|
+
{ ignores: options.ignores },
|
|
218
|
+
...options.enabled === true ? [import_eslint_plugin_zod.default.configs.recommended] : [],
|
|
219
|
+
{
|
|
220
|
+
files: options.js?.files,
|
|
221
|
+
languageOptions: options.js?.languageOptions,
|
|
222
|
+
plugins: options.js?.plugins,
|
|
223
|
+
rules: options.enabled === true ? options.js?.rules : {}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
files: options.ts?.files,
|
|
227
|
+
languageOptions: options.ts?.languageOptions,
|
|
228
|
+
plugins: options.ts?.plugins,
|
|
229
|
+
rules: options.enabled === true ? options.ts?.rules : {}
|
|
230
|
+
},
|
|
231
|
+
...options.configs ?? []
|
|
232
|
+
];
|
|
235
233
|
};
|
|
236
234
|
// Annotate the CommonJS export names for ESM import in node:
|
|
237
235
|
0 && (module.exports = {
|
package/dist/main.mjs
CHANGED
|
@@ -177,25 +177,23 @@ var rulint = (options = RulintOptionsDefault) => {
|
|
|
177
177
|
options = merge({}, RulintOptionsDefault, options);
|
|
178
178
|
if (options.append?.["no-restricted-imports"] && typeof options.js?.rules?.["no-restricted-imports"] === "object") options.js.rules["no-restricted-imports"] = [...options.js.rules["no-restricted-imports"], ...options.append["no-restricted-imports"]];
|
|
179
179
|
if (options.append?.["no-restricted-syntax"] && typeof options.js?.rules?.["no-restricted-syntax"] === "object") options.js.rules["no-restricted-syntax"] = [...options.js.rules["no-restricted-syntax"], ...options.append["no-restricted-syntax"]];
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
];
|
|
198
|
-
} else return [{ ignores: options.ignores }, ...options.configs ?? []];
|
|
180
|
+
return [
|
|
181
|
+
{ ignores: options.ignores },
|
|
182
|
+
...options.enabled === true ? [EslintPluginZod.configs.recommended] : [],
|
|
183
|
+
{
|
|
184
|
+
files: options.js?.files,
|
|
185
|
+
languageOptions: options.js?.languageOptions,
|
|
186
|
+
plugins: options.js?.plugins,
|
|
187
|
+
rules: options.enabled === true ? options.js?.rules : {}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
files: options.ts?.files,
|
|
191
|
+
languageOptions: options.ts?.languageOptions,
|
|
192
|
+
plugins: options.ts?.plugins,
|
|
193
|
+
rules: options.enabled === true ? options.ts?.rules : {}
|
|
194
|
+
},
|
|
195
|
+
...options.configs ?? []
|
|
196
|
+
];
|
|
199
197
|
};
|
|
200
198
|
export {
|
|
201
199
|
rulint
|