diff --git a/package-lock.json b/package-lock.json index 91183a97..020ffefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "http-server": "^14.1.1", "husky": "^8.0.3", "lint-staged": "^14.0.1", - "prettier": "^3.0.3", + "prettier": "3.1.0", "storybook": "^7.4.1", "turbo": "^1.10.13", "typescript": "^5.2.2", @@ -27496,8 +27496,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "license": "MIT", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "bin": { "prettier": "bin/prettier.cjs" }, diff --git a/package.json b/package.json index 7b81a0d5..c4d41f09 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "husky": "^8.0.3", "http-server": "^14.1.1", "lint-staged": "^14.0.1", - "prettier": "^3.0.3", + "prettier": "3.1.0", "storybook": "^7.4.1", "turbo": "^1.10.13", "typescript": "^5.2.2", diff --git a/packages/eslint-config-custom/next.js b/packages/eslint-config-custom/next.js index 44b5a664..86fbdfc8 100644 --- a/packages/eslint-config-custom/next.js +++ b/packages/eslint-config-custom/next.js @@ -2,5 +2,6 @@ module.exports = { extends: ['turbo', 'plugin:smile/next'], rules: { '@typescript-eslint/ban-types': ['error', { types: { Object: false } }], + 'require-await': 'off', }, }; diff --git a/packages/react-front-kit-dropzone/babel.config.js b/packages/react-front-kit-dropzone/babel.config.cjs similarity index 100% rename from packages/react-front-kit-dropzone/babel.config.js rename to packages/react-front-kit-dropzone/babel.config.cjs diff --git a/packages/react-front-kit-shared/babel.config.js b/packages/react-front-kit-shared/babel.config.cjs similarity index 100% rename from packages/react-front-kit-shared/babel.config.js rename to packages/react-front-kit-shared/babel.config.cjs diff --git a/packages/react-front-kit-shared/package.json b/packages/react-front-kit-shared/package.json index cf08ae9d..c872cc0c 100644 --- a/packages/react-front-kit-shared/package.json +++ b/packages/react-front-kit-shared/package.json @@ -38,8 +38,12 @@ "types": "./dist/index.d.ts", "typesVersions": { "*": { - "storybook-utils": ["dist/storybook-utils/index.d.ts"], - "test-utils": ["dist/test-utils/index.d.ts"] + "storybook-utils": [ + "dist/storybook-utils/index.d.ts" + ], + "test-utils": [ + "dist/test-utils/index.d.ts" + ] } }, "files": [ diff --git a/packages/react-front-kit-table/babel.config.js b/packages/react-front-kit-table/babel.config.cjs similarity index 100% rename from packages/react-front-kit-table/babel.config.js rename to packages/react-front-kit-table/babel.config.cjs diff --git a/packages/react-front-kit/babel.config.js b/packages/react-front-kit/babel.config.cjs similarity index 100% rename from packages/react-front-kit/babel.config.js rename to packages/react-front-kit/babel.config.cjs diff --git a/packages/react-front-kit/src/helpers/typeGuard.ts b/packages/react-front-kit/src/helpers/typeGuard.ts index 25b432a5..5a6053ad 100644 --- a/packages/react-front-kit/src/helpers/typeGuard.ts +++ b/packages/react-front-kit/src/helpers/typeGuard.ts @@ -13,8 +13,8 @@ export type IGuardedType = T extends new ( ) => infer U ? U : T extends keyof ITypeMap - ? ITypeMap[T] - : never; + ? ITypeMap[T] + : never; export function typeGuard( o: unknown, diff --git a/packages/test/package.json b/packages/test/package.json index a6d61d75..e9f3f17d 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -6,8 +6,11 @@ "publishConfig": { "access": "public" }, - "main": "./dist/index.js", - "module": "./src/index.ts", + "exports": { + ".": "./dist/index.js", + "./fileMock": "./dist/fileMock.js", + "./setupTests": "./dist/setupTests.js" + }, "types": "./dist/index.d.ts", "scripts": { "build": "tsc --project tsconfig.build.json" diff --git a/packages/test/src/index.ts b/packages/test/src/index.ts index e00654a3..5f931532 100644 --- a/packages/test/src/index.ts +++ b/packages/test/src/index.ts @@ -1,2 +1,2 @@ -export { default as babelConfig } from './babel.config'; -export { default as jestConfig } from './jest.config'; +export { default as babelConfig } from './babel.config.js'; +export { default as jestConfig } from './jest.config.js'; diff --git a/packages/test/src/jest.config.ts b/packages/test/src/jest.config.ts index b9d998d2..9b4ac5df 100644 --- a/packages/test/src/jest.config.ts +++ b/packages/test/src/jest.config.ts @@ -2,12 +2,12 @@ import type { Config } from 'jest'; const config: Config = { moduleNameMapper: { - '\\.(css|less)$': 'test/src/fileMock.ts', + '\\.(css|less)$': 'test/fileMock', '\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - 'test/src/fileMock.ts', + 'test/fileMock', }, roots: ['src'], - setupFilesAfterEnv: ['test/setupTests.ts'], + setupFilesAfterEnv: ['test/setupTests'], testEnvironment: 'jsdom', transformIgnorePatterns: ['/node_modules/(?!(pretty-bytes)/)'], }; diff --git a/packages/test/setupTests.ts b/packages/test/src/setupTests.ts similarity index 100% rename from packages/test/setupTests.ts rename to packages/test/src/setupTests.ts diff --git a/packages/test/tsconfig.build.json b/packages/test/tsconfig.build.json index ab6df470..e0b9b9a2 100644 --- a/packages/test/tsconfig.build.json +++ b/packages/test/tsconfig.build.json @@ -1,7 +1,7 @@ { "extends": "tsconfig/react-library.json", "compilerOptions": { - "module": "Node16", + "module": "node16", "moduleResolution": "node16", "outDir": "dist" },