@deot/dev-eslint 2.8.0 → 2.8.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/index.cjs +6 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -48,16 +48,17 @@ const cleanRules = (key, all, recommended, current) => {
|
|
|
48
48
|
delete current[i];
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
+
const isTest = process.env.NODE_ENV === "UNIT" && !process.env.CI;
|
|
51
52
|
/* istanbul ignore next -- @preserve */
|
|
52
|
-
if (removed.length) {
|
|
53
|
+
if (isTest && removed.length) {
|
|
53
54
|
console.error(key + ": " + removed.join(",") + " has removed!\n");
|
|
54
55
|
}
|
|
55
56
|
/* istanbul ignore next -- @preserve */
|
|
56
|
-
if (invaild.length) {
|
|
57
|
+
if (isTest && invaild.length) {
|
|
57
58
|
console.error(key + ": " + invaild.join(",") + " has off default!\n");
|
|
58
59
|
}
|
|
59
60
|
/* istanbul ignore next -- @preserve */
|
|
60
|
-
if (deprecated.length) {
|
|
61
|
+
if (isTest && deprecated.length) {
|
|
61
62
|
console.error(key + ": " + deprecated.join(",") + " has deprecated!\n");
|
|
62
63
|
}
|
|
63
64
|
return current;
|
|
@@ -331,7 +332,7 @@ const stylistic = async (options$) => {
|
|
|
331
332
|
];
|
|
332
333
|
};
|
|
333
334
|
|
|
334
|
-
const
|
|
335
|
+
const configure = async (options, ...userConfigs) => {
|
|
335
336
|
const configs = [
|
|
336
337
|
...await ignores(options?.ignores),
|
|
337
338
|
...await javascript(options),
|
|
@@ -344,4 +345,4 @@ const configuire = async (options, ...userConfigs) => {
|
|
|
344
345
|
return configs.concat(userConfigs);
|
|
345
346
|
};
|
|
346
347
|
|
|
347
|
-
exports.
|
|
348
|
+
exports.configure = configure;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare interface ConfigOptions {
|
|
|
6
6
|
overrides?: Rules;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const configure: (options?: Options, ...userConfigs: FlatConfig[]) => Promise<FlatConfig[]>;
|
|
10
10
|
|
|
11
11
|
export declare type FlatConfig = Linter.FlatConfig;
|
|
12
12
|
|
package/dist/index.js
CHANGED
|
@@ -44,16 +44,17 @@ const cleanRules = (key, all, recommended, current) => {
|
|
|
44
44
|
delete current[i];
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
+
const isTest = process.env.NODE_ENV === "UNIT" && !process.env.CI;
|
|
47
48
|
/* istanbul ignore next -- @preserve */
|
|
48
|
-
if (removed.length) {
|
|
49
|
+
if (isTest && removed.length) {
|
|
49
50
|
console.error(key + ": " + removed.join(",") + " has removed!\n");
|
|
50
51
|
}
|
|
51
52
|
/* istanbul ignore next -- @preserve */
|
|
52
|
-
if (invaild.length) {
|
|
53
|
+
if (isTest && invaild.length) {
|
|
53
54
|
console.error(key + ": " + invaild.join(",") + " has off default!\n");
|
|
54
55
|
}
|
|
55
56
|
/* istanbul ignore next -- @preserve */
|
|
56
|
-
if (deprecated.length) {
|
|
57
|
+
if (isTest && deprecated.length) {
|
|
57
58
|
console.error(key + ": " + deprecated.join(",") + " has deprecated!\n");
|
|
58
59
|
}
|
|
59
60
|
return current;
|
|
@@ -327,7 +328,7 @@ const stylistic = async (options$) => {
|
|
|
327
328
|
];
|
|
328
329
|
};
|
|
329
330
|
|
|
330
|
-
const
|
|
331
|
+
const configure = async (options, ...userConfigs) => {
|
|
331
332
|
const configs = [
|
|
332
333
|
...await ignores(options?.ignores),
|
|
333
334
|
...await javascript(options),
|
|
@@ -340,4 +341,4 @@ const configuire = async (options, ...userConfigs) => {
|
|
|
340
341
|
return configs.concat(userConfigs);
|
|
341
342
|
};
|
|
342
343
|
|
|
343
|
-
export {
|
|
344
|
+
export { configure };
|