build: fix ts file build

This commit is contained in:
LongYinan 2020-08-24 17:06:26 +08:00
parent 100ad98407
commit 494e870226
No known key found for this signature in database
GPG key ID: A3FFE134A3E20881
4 changed files with 23 additions and 20 deletions

View file

@ -204,3 +204,11 @@ rules:
],
},
]
overrides:
- files:
- ./test_module/**/*.{ts,js}
plugins:
- '@typescript-eslint'
parserOptions:
project: ./test_module/tsconfig.json

View file

@ -25,7 +25,7 @@
"format:rs": "cargo fmt",
"format:source": "prettier --config ./package.json --write './**/*.js'",
"format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'",
"lint": "eslint -c .eslintrc.yml",
"lint": "eslint -c .eslintrc.yml './src/**/*.ts' './test_module/**/*.{ts,js}'",
"test": "ava"
},
"bugs": {
@ -44,29 +44,16 @@
"trailingComma": "all",
"arrowParens": "always"
},
"files": [
"scripts",
"LICENSE"
],
"files": ["scripts", "LICENSE"],
"lint-staged": {
"*.js": [
"prettier --write"
],
"*.@(yml|yaml)": [
"prettier --parser yaml --write"
],
"*.json": [
"prettier --parser json --write"
],
"*.md": [
"prettier --parser markdown --write"
]
"*.js": ["prettier --write"],
"*.@(yml|yaml)": ["prettier --parser yaml --write"],
"*.json": ["prettier --parser json --write"],
"*.md": ["prettier --parser markdown --write"]
},
"ava": {
"extensions": ["ts", "tsx"],
"files": [
"test_module/__test__/**/*.spec.ts"
],
"files": ["test_module/__test__/**/*.spec.ts"],
"require": ["@swc-node/register"]
},
"husky": {

View file

@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"include": ["."],
"compilerOptions": {
"outDir": "./dist"
}
}

View file

@ -39,5 +39,6 @@
"esnext"
]
},
"include": ["./src"],
"exclude": ["node_modules"]
}