@cabify/eslint-config 3.0.1-beta-13 → 3.0.1-beta-14

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,34 +19,6 @@ import strict from './strict.js';
19
19
  import style from './style.js';
20
20
  import variables from './variables.js';
21
21
 
22
- /*
23
- async function checkIsTSAvailable() {
24
- try {
25
- // Dynamically import the package
26
- await import('typescript');
27
- console.log(`Package typescript is available`);
28
- return true;
29
- } catch (error) {
30
- console.log(error);
31
- console.log(`Package typescript is not available`);
32
- return false;
33
- }
34
- }
35
-
36
- async function checkJestTSAvailable() {
37
- try {
38
- // Dynamically import the package
39
- await import('jest');
40
- console.log(`Package jest is available`);
41
- return true;
42
- } catch (error) {
43
- console.log(error);
44
- console.log(`Package jest is not available`);
45
- return false;
46
- }
47
- }
48
- */
49
-
50
22
  const isTSAvailable = await isPackageAvailable('typescript');
51
23
  let tsConfigs = [];
52
24
  if (isTSAvailable) {
@@ -59,7 +31,7 @@ const configs = [
59
31
  bestPractices,
60
32
  errors,
61
33
  es6,
62
- imports,
34
+ ...imports,
63
35
  node,
64
36
  promises,
65
37
  strict,
@@ -83,8 +55,6 @@ const overrides = [
83
55
  },
84
56
  ].filter(Boolean);
85
57
 
86
- console.log({ tsConfigs });
87
-
88
58
  export default [
89
59
  ...configs,
90
60
  {
@@ -2,7 +2,7 @@ import importPlugin from 'eslint-plugin-import';
2
2
  import simpleImportSort from 'eslint-plugin-simple-import-sort';
3
3
  import globals from 'globals';
4
4
 
5
- export default {
5
+ const configs = {
6
6
  name: 'imports-cabify-eslint-config',
7
7
  languageOptions: {
8
8
  globals: {
@@ -10,7 +10,6 @@ export default {
10
10
  },
11
11
  },
12
12
  plugins: {
13
- import: importPlugin,
14
13
  'simple-import-sort': simpleImportSort,
15
14
  },
16
15
  settings: {
@@ -275,3 +274,5 @@ export default {
275
274
  'import/no-relative-parent-imports': 'off',
276
275
  },
277
276
  };
277
+
278
+ export default [importPlugin.flatConfigs.recommended, configs];
package/configs/ts.js CHANGED
@@ -158,4 +158,5 @@ if (tsLintConfig.length) {
158
158
  });
159
159
  }
160
160
 
161
+ // eslint-disable-next-line import/prefer-default-export
161
162
  export { tsLintConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabify/eslint-config",
3
- "version": "3.0.1-beta-13",
3
+ "version": "3.0.1-beta-14",
4
4
  "description": "ESLint config for Cabify Javascript projects",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -42,7 +42,7 @@
42
42
  "@typescript-eslint/parser": "^8.4.0",
43
43
  "confusing-browser-globals": "^1.0.10",
44
44
  "eslint-config-prettier": "^9.1.0",
45
- "eslint-plugin-import": "^2.30.0",
45
+ "eslint-plugin-import": "^2.31.0",
46
46
  "eslint-plugin-jest": "^28.8.3",
47
47
  "eslint-plugin-jsx-a11y": "^6.10.0",
48
48
  "eslint-plugin-lodash": "^7.4.0",