@fullstacksjs/eslint-config 9.0.11 → 9.0.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.
Files changed (3) hide show
  1. package/init.d.ts +1 -2
  2. package/init.js +7 -11
  3. package/package.json +1 -1
package/init.d.ts CHANGED
@@ -12,5 +12,4 @@ export interface Options {
12
12
  overrides: import('eslint').Linter.Config;
13
13
  }
14
14
 
15
- declare const init: (opts: Options) => import('eslint').Linter.Config;
16
- export default init;
15
+ export declare const init: (opts: Options) => import('eslint').Linter.Config;
package/init.js CHANGED
@@ -23,7 +23,7 @@ function init(opts = {}) {
23
23
  opts.esm && require.resolve('./esm'),
24
24
  opts.strict && require.resolve('./strict'),
25
25
  require.resolve('./prettier'),
26
- ...extendsOverrides,
26
+ ...(extendsOverrides ?? []),
27
27
  ]),
28
28
  ...overrides,
29
29
  };
@@ -31,27 +31,23 @@ function init(opts = {}) {
31
31
  if (opts.react === 'raw') config.extends.push(require.resolve('./react.js'));
32
32
 
33
33
  if (opts.typescript?.parserProject) {
34
- config.parserOptions = {
35
- ...config.parserOptions,
34
+ config.parserOptions = merge({
36
35
  project: opts.typescript.parserProject,
37
- };
36
+ });
38
37
  }
39
38
 
40
39
  if (opts.typescript?.resolverProject) {
41
40
  config.extends.push(require.resolve('./typecheck.js'));
42
- config.settings = {
43
- ...config.settings,
41
+ config.settings = merge(config.settings, {
44
42
  'import/resolver': {
45
- ...config.settings['import/resolver'],
46
43
  typescript: {
47
- ...config.settings['import/resolver'].typescript,
48
- project: opts.typescript.parserProject,
44
+ project: opts.typescript.resolverProject,
49
45
  },
50
46
  },
51
- };
47
+ });
52
48
  }
53
49
 
54
50
  return config;
55
51
  }
56
52
 
57
- module.exports = init;
53
+ module.exports.init = init;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "9.0.11",
3
+ "version": "9.0.13",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",