@commercetools-frontend/eslint-config-mc-app 27.5.3 → 27.5.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @commercetools-frontend/eslint-config-mc-app
2
2
 
3
+ ## 27.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4006](https://github.com/commercetools/merchant-center-application-kit/pull/4006) [`1b2d65c`](https://github.com/commercetools/merchant-center-application-kit/commit/1b2d65c6058231bb53a6315ff5d81390f398c551) Thanks [@ByronDWall](https://github.com/ByronDWall)! - Add `eslint-import-resolver-typescript` to the base ESLint config block so JS/JSX files can resolve non-hoisted pnpm packages and packages using only the `exports` field.
8
+
9
+ - Updated dependencies []:
10
+ - @commercetools-frontend/babel-preset-mc-app@27.5.4
11
+
3
12
  ## 27.5.3
4
13
 
5
14
  ### Patch Changes
package/index.js CHANGED
@@ -135,6 +135,11 @@ module.exports = [
135
135
  },
136
136
  settings: {
137
137
  'import/resolver': {
138
+ // The node resolver alone can't resolve non-hoisted pnpm packages
139
+ // or packages that only use the `exports` field (no main/module).
140
+ typescript: {
141
+ alwaysTryTypes: true,
142
+ },
138
143
  node: {
139
144
  extensions: allSupportedExtensions,
140
145
  },
package/index.spec.js ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @jest-environment node
3
+ */
4
+ const config = require('./index');
5
+
6
+ describe('eslint-config-mc-app flat config', () => {
7
+ const baseConfig = config.find(
8
+ (block) =>
9
+ Array.isArray(block.files) &&
10
+ block.files.some((f) => f.includes('{js,jsx,ts,tsx,cjs,mjs}'))
11
+ );
12
+
13
+ it('should include typescript resolver in the base config block', () => {
14
+ expect(baseConfig.settings['import/resolver']).toEqual(
15
+ expect.objectContaining({
16
+ typescript: {
17
+ alwaysTryTypes: true,
18
+ },
19
+ })
20
+ );
21
+ });
22
+
23
+ it('should still include node resolver in the base config block', () => {
24
+ expect(baseConfig.settings['import/resolver']).toEqual(
25
+ expect.objectContaining({
26
+ node: expect.objectContaining({
27
+ extensions: expect.any(Array),
28
+ }),
29
+ })
30
+ );
31
+ });
32
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/eslint-config-mc-app",
3
- "version": "27.5.3",
3
+ "version": "27.5.4",
4
4
  "description": "ESLint config used by Merchant Center customizations.",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@babel/core": "^7.22.17",
25
25
  "@babel/eslint-parser": "^7.22.15",
26
- "@commercetools-frontend/babel-preset-mc-app": "^27.5.3",
26
+ "@commercetools-frontend/babel-preset-mc-app": "^27.5.4",
27
27
  "@typescript-eslint/eslint-plugin": "^8.55.0",
28
28
  "@typescript-eslint/parser": "^8.55.0",
29
29
  "confusing-browser-globals": "^1.0.11",