@cabify/eslint-config 3.0.1-beta-11 → 3.0.1-beta-12
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/configs/base.js +3 -16
- package/configs/ts.js +1 -1
- package/package.json +1 -1
package/configs/base.js
CHANGED
|
@@ -45,26 +45,13 @@ async function checkJestTSAvailable() {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
try {
|
|
50
|
-
// Dynamically import the package
|
|
51
|
-
await import('next');
|
|
52
|
-
console.log(`Package next is available`);
|
|
53
|
-
return true;
|
|
54
|
-
} catch (error) {
|
|
55
|
-
console.log(error);
|
|
56
|
-
console.log(`Package next is not available`);
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const isTSAvailable = true;
|
|
48
|
+
const isTSAvailable = await checkIsTSAvailable();
|
|
62
49
|
let tsConfigs = [];
|
|
63
50
|
if (isTSAvailable) {
|
|
64
|
-
|
|
51
|
+
const { tsLintConfig } = await import('./ts.js');
|
|
52
|
+
tsConfigs = tsLintConfig;
|
|
65
53
|
}
|
|
66
54
|
const isJestAvailable = await checkJestTSAvailable();
|
|
67
|
-
checkNextJSAvailable();
|
|
68
55
|
|
|
69
56
|
const configs = [
|
|
70
57
|
bestPractices,
|
package/configs/ts.js
CHANGED