@cabify/eslint-config 3.0.1-beta-11 → 3.0.1-beta-13
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 +6 -17
- package/configs/ts.js +1 -1
- package/package.json +1 -1
package/configs/base.js
CHANGED
|
@@ -19,6 +19,7 @@ import strict from './strict.js';
|
|
|
19
19
|
import style from './style.js';
|
|
20
20
|
import variables from './variables.js';
|
|
21
21
|
|
|
22
|
+
/*
|
|
22
23
|
async function checkIsTSAvailable() {
|
|
23
24
|
try {
|
|
24
25
|
// Dynamically import the package
|
|
@@ -44,27 +45,15 @@ async function checkJestTSAvailable() {
|
|
|
44
45
|
return false;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
48
|
+
*/
|
|
47
49
|
|
|
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;
|
|
50
|
+
const isTSAvailable = await isPackageAvailable('typescript');
|
|
62
51
|
let tsConfigs = [];
|
|
63
52
|
if (isTSAvailable) {
|
|
64
|
-
|
|
53
|
+
const { tsLintConfig } = await import('./ts.js');
|
|
54
|
+
tsConfigs = tsLintConfig;
|
|
65
55
|
}
|
|
66
|
-
const isJestAvailable = await
|
|
67
|
-
checkNextJSAvailable();
|
|
56
|
+
const isJestAvailable = await isPackageAvailable('jest');
|
|
68
57
|
|
|
69
58
|
const configs = [
|
|
70
59
|
bestPractices,
|
package/configs/ts.js
CHANGED