@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 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
- async function checkNextJSAvailable() {
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
- tsConfigs = await import('./ts.js');
53
+ const { tsLintConfig } = await import('./ts.js');
54
+ tsConfigs = tsLintConfig;
65
55
  }
66
- const isJestAvailable = await checkJestTSAvailable();
67
- checkNextJSAvailable();
56
+ const isJestAvailable = await isPackageAvailable('jest');
68
57
 
69
58
  const configs = [
70
59
  bestPractices,
package/configs/ts.js CHANGED
@@ -158,4 +158,4 @@ if (tsLintConfig.length) {
158
158
  });
159
159
  }
160
160
 
161
- export default tsLintConfig;
161
+ export { tsLintConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabify/eslint-config",
3
- "version": "3.0.1-beta-11",
3
+ "version": "3.0.1-beta-13",
4
4
  "description": "ESLint config for Cabify Javascript projects",
5
5
  "type": "module",
6
6
  "scripts": {