zeno-config 4.0.1 → 4.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zeno-config",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Preconfigured and opinionated ESLint, Prettier, and TypeScript setup",
5
5
  "author": "Rick Brenn <brenn.rick@gmail.com>",
6
6
  "license": "MIT",
@@ -68,7 +68,8 @@
68
68
  "@eslint/js": "9.39.2",
69
69
  "@stylistic/eslint-plugin": "5.10.0",
70
70
  "eslint-config-prettier": "10.1.8",
71
- "eslint-import-resolver-webpack": "^0.13.10",
71
+ "eslint-import-resolver-typescript": "4.4.4",
72
+ "eslint-import-resolver-webpack": "0.13.10",
72
73
  "eslint-plugin-import-x": "4.16.2",
73
74
  "eslint-plugin-jsx-a11y": "6.10.2",
74
75
  "eslint-plugin-n": "17.24.0",
@@ -9,6 +9,8 @@ interface BaseConfigOptions {
9
9
  extensionsIgnorePattern?: Record<string, string>;
10
10
  /** Path to webpack config for import resolver */
11
11
  webpackConfig?: string;
12
+ /** Enable TypeScript import resolution */
13
+ ts?: boolean;
12
14
  /** Disables expensive rules for performance */
13
15
  performanceMode?: boolean;
14
16
  }
@@ -54,6 +54,7 @@ const defaultIgnoreDirs = [
54
54
  * @param {string[]} [options.additionalDevDependencies] - Additional file patterns to allow dev dependencies in (for no-extraneous-dependencies rule).
55
55
  * @param {Object} [options.extensionsIgnorePattern] - Extension patterns to ignore for import rules.
56
56
  * @param {string} [options.webpackConfig] - Path to webpack config for import resolver.
57
+ * @param {boolean} [options.ts=false] - Enable TypeScript import resolution.
57
58
  * @param {boolean} [options.performanceMode=false] - Disables expensive rules for performance.
58
59
  * @returns {Array} ESLint flat config array.
59
60
  */
@@ -72,6 +73,7 @@ const baseConfig = (options = {}) => {
72
73
  settings: {
73
74
  'import-x/resolver': {
74
75
  node: { extensions: allExtensions },
76
+ ...(options.ts ? { typescript: true } : {}),
75
77
  ...(options.webpackConfig
76
78
  ? { webpack: { config: options.webpackConfig } }
77
79
  : {}),
@@ -129,11 +131,6 @@ const nodeConfig = (options = {}) => {
129
131
  ...globals.node,
130
132
  },
131
133
  },
132
- settings: {
133
- node: {
134
- version: '>=20.0.0',
135
- },
136
- },
137
134
  plugins: {
138
135
  n: nodePlugin,
139
136
  },
@@ -420,6 +417,7 @@ const defineZenoConfig = (arg1, arg2) => {
420
417
  ignoreExports: options.ignoreExports,
421
418
  additionalDevDependencies: options.additionalDevDependencies,
422
419
  webpackConfig: options.webpackConfig,
420
+ ts: options.ts,
423
421
  extensionsIgnorePattern: options.extensionsIgnorePattern,
424
422
  performanceMode: options.performanceMode,
425
423
  }),