chore: Move swc config to single file

This commit is contained in:
Sam Tolmay 2021-11-07 19:48:06 +02:00
parent a0b5f13e2c
commit 0866e93f5a
No known key found for this signature in database
GPG Key ID: D004126FCD1A6DF0
17 changed files with 10 additions and 125 deletions

3
.swcrc
View File

@ -1,11 +1,12 @@
{
"exclude": [".*.test.js$"],
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2018",
"target": "es2020",
"keepClassNames": true
},
"module": {

View File

@ -1,17 +0,0 @@
{
"exclude": [".*.test.js$"],
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2020",
"keepClassNames": true
},
"module": {
"type": "es6",
"noInterop": true,
"ignoreDynamic": true
}
}

View File

@ -9,6 +9,6 @@ module.exports = {
testEnvironment: 'node',
testPathIgnorePatterns: ['<rootDir>/dist/'],
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '.swcrc.test' }],
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../.swcrc.test' }],
},
};

View File

@ -36,7 +36,7 @@
"build": "yarn clean && yarn swc",
"clean": "rm -rf dist",
"prepare": "yarn build",
"swc": "swc src --out-dir dist",
"swc": "swc src --out-dir dist --config-file ../../.swcrc",
"test": "jest --coverage"
},
"dependencies": {

View File

@ -1,17 +0,0 @@
{
"exclude": [".*.test.js$"],
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2020",
"keepClassNames": true
},
"module": {
"type": "es6",
"noInterop": true,
"ignoreDynamic": true
}
}

View File

@ -1,16 +0,0 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2020",
"keepClassNames": true
},
"module": {
"type": "es6",
"noInterop": true,
"ignoreDynamic": true
}
}

View File

@ -10,6 +10,6 @@ module.exports = {
testEnvironment: 'node',
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '.swcrc.test' }],
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../.swcrc.test' }],
},
};

View File

@ -33,7 +33,7 @@
"build": "yarn clean && yarn swc",
"clean": "rm -rf dist",
"prepare": "yarn build",
"swc": "swc src --out-dir dist",
"swc": "swc src --out-dir dist --config-file ../../.swcrc",
"test": "jest --coverage"
},
"dependencies": {

View File

@ -1,17 +0,0 @@
{
"exclude": [".*.test.js$"],
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2020",
"keepClassNames": true
},
"module": {
"type": "es6",
"noInterop": true,
"ignoreDynamic": true
}
}

View File

@ -1,16 +0,0 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2020",
"keepClassNames": true
},
"module": {
"type": "es6",
"noInterop": true,
"ignoreDynamic": true
}
}

View File

@ -9,6 +9,6 @@ module.exports = {
testEnvironment: 'node',
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '.swcrc.test' }],
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../.swcrc.test' }],
},
};

View File

@ -33,7 +33,7 @@
"clean": "rm -rf dist",
"prepare": "yarn build",
"start": "node run.js",
"swc": "swc src --out-dir dist",
"swc": "swc src --out-dir dist --config-file ../../.swcrc",
"test": "jest --coverage"
},
"dependencies": {

View File

@ -1,17 +0,0 @@
{
"exclude": [".*.test.js$"],
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2020",
"keepClassNames": true
},
"module": {
"type": "es6",
"noInterop": true,
"ignoreDynamic": true
}
}

View File

@ -1,16 +0,0 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true
},
"target": "es2020",
"keepClassNames": true
},
"module": {
"type": "es6",
"noInterop": true,
"ignoreDynamic": true
}
}

View File

@ -9,6 +9,6 @@ module.exports = {
testEnvironment: 'node',
testPathIgnorePatterns: ['<rootDir>/dist/'],
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '.swcrc.test' }],
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../.swcrc.test' }],
},
};

View File

@ -34,7 +34,7 @@
"build": "yarn clean && yarn swc",
"clean": "rm -rf dist",
"prepare": "yarn build",
"swc": "swc src --out-dir dist",
"swc": "swc src --out-dir dist --config-file ../../.swcrc",
"test": "jest --coverage"
},
"dependencies": {