Skip to content

Commit af06074

Browse files
committed
Merge branch 'feature/swc'
2 parents eb21323 + c801090 commit af06074

File tree

10 files changed

+1413
-44
lines changed

10 files changed

+1413
-44
lines changed

.eslintrc.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin', 'simple-import-sort'],
8+
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
9+
root: true,
10+
env: {
11+
node: true,
12+
jest: true,
13+
},
14+
ignorePatterns: ['.eslintrc.js'],
15+
rules: {
16+
'@typescript-eslint/interface-name-prefix': 'off',
17+
'@typescript-eslint/explicit-function-return-type': 'off',
18+
'@typescript-eslint/explicit-module-boundary-types': 'off',
19+
'@typescript-eslint/no-explicit-any': 'off',
20+
'simple-import-sort/imports': [
21+
'error',
22+
{
23+
groups: [
24+
// Packages `react` related packages come first.
25+
['^@nestjs', '^@?\\w'],
26+
// Internal packages.
27+
['^(@|src)(/.*|$)'],
28+
// Side effect imports.
29+
['^\\u0000'],
30+
// Parent imports. Put `..` last.
31+
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
32+
// Other relative imports. Put same-folder imports and `.` last.
33+
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
34+
// Style imports.
35+
['^.+\\.?(css)$'],
36+
],
37+
},
38+
],
39+
},
40+
};

.npmrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
auto-install-peers=true
1+
auto-install-peers=true
2+
legacy-peer-deps=true
3+
node-linker=hoisted

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16.14.2

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
semi: true,
3+
singleQuote: true,
4+
endOfLine: "lf",
5+
printWidth: 100,
6+
tabWidth: 2,
7+
};

nodemon.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"ignore": [
77
"src/**/*.spec.ts"
88
],
9-
"exec": "cross-env NODE_ENV=development node --max_old_space_size=10000 -r ts-node/register -r tsconfig-paths/register src/index.tsx"
9+
"exec": "cross-env NODE_ENV=development node --max_old_space_size=10000 -r ts-node/register -r tsconfig-paths/register src/index.ts"
1010
}

package.json

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "./dist/cjs/index.js",
66
"types": "./dist/esm/index.d.ts",
77
"module": "./dist/esm/index.js",
8-
"type": "commonjs",
98
"files": [
109
"dist"
1110
],
@@ -17,12 +16,13 @@
1716
}
1817
},
1918
"scripts": {
20-
"build": "tsc",
2119
"clean": "rimraf dist/",
22-
"dev": "nodemon",
20+
"dev": "nodemon --quiet",
2321
"start:dev": "tsc --watch",
2422
"start": "node ./dist/index.js",
25-
"compile": "npm run clean && tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"
23+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
24+
"build": "npm run clean && tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json",
25+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\""
2626
},
2727
"author": "npv2k1",
2828
"license": "MIT",
@@ -31,17 +31,28 @@
3131
"react": "^18.2.0"
3232
},
3333
"devDependencies": {
34+
"@swc/cli": "^0.1.62",
35+
"@swc/core": "^1.3.74",
36+
"@swc/helpers": "^0.5.1",
3437
"@types/node": "^18.16.19",
3538
"concurrently": "^7.6.0",
3639
"copyfiles": "^2.4.1",
3740
"cross-env": "^7.0.3",
3841
"nodemon": "^2.0.22",
42+
"regenerator-runtime": "^0.13.11",
3943
"rimraf": "^3.0.2",
4044
"ts-node": "^10.9.1",
4145
"ts-node-dev": "^2.0.0",
4246
"tsconfig-paths": "^4.2.0",
4347
"tslib": "^2.6.0",
44-
"typescript": "^4.9.5",
45-
"unbuild": "^1.2.1"
48+
"typescript": "4.7.4",
49+
"unbuild": "^1.2.1",
50+
"prettier": "2.7.1",
51+
"@typescript-eslint/eslint-plugin": "5.30.7",
52+
"@typescript-eslint/parser": "5.30.7",
53+
"eslint": "8.20.0",
54+
"eslint-config-prettier": "8.5.0",
55+
"eslint-plugin-prettier": "4.2.1",
56+
"eslint-plugin-simple-import-sort": "^10.0.0"
4657
}
47-
}
58+
}

0 commit comments

Comments
 (0)