Skip to content

Commit

Permalink
fix: make it only used on js and jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois committed Oct 11, 2023
1 parent 8e7d4a6 commit 1f7bbe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/scripts-config-swc/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": false,
"privateMethod": false,
Expand Down
5 changes: 2 additions & 3 deletions tools/scripts-core/src/scripts/build-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export default async function build(env, presetApi, unsafeOptions) {
const babelConfigPath =

Check warning on line 28 in tools/scripts-core/src/scripts/build-lib.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

tools/scripts-core/src/scripts/build-lib.js#L28

[no-unused-vars] 'babelConfigPath' is assigned a value but never used.
getUserConfigFile(['.babelrc', '.babelrc.json', 'babel.config.js']) ||
path.join(babelRootPath, '.babelrc.json');
const swcConfigPath =
getUserConfigFile(['.swcrc']) || path.join(swcRootPath, '.swcrc-typescript');
const swcConfigPath = getUserConfigFile(['.swcrc']) || path.join(swcRootPath, '.swcrc');
const tscConfigPath =
getUserConfigFile(['tsconfig.build.json', 'tsconfig.json']) ||
path.join(tsRootPath, 'tsconfig.json');
Expand Down Expand Up @@ -63,7 +62,7 @@ export default async function build(env, presetApi, unsafeOptions) {
// @see https://github.com/babel/babel/issues/12008
'**/*.test.js,**/*.test.ts,**/*.test.tsx,**/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.stories.js,**/*.stories.ts,**/*.stories.tsx',
'--extensions',
'.js,.ts,.tsx,.jsx',
'.js,.jsx',
...options,
],
{
Expand Down

0 comments on commit 1f7bbe5

Please sign in to comment.