a00cc184 by McLemore

build: resolve ts file

1 parent ddfa7479
1 ### 组件简介
2
3 ### 使用方法
1 4
2 ### 开始开发 5 ### 开始开发
3 1. 本地执行`npm run dev` 6 1. 本地执行`npm run dev`
......
...@@ -2,6 +2,25 @@ ...@@ -2,6 +2,25 @@
2 "parser": "@typescript-eslint/parser", 2 "parser": "@typescript-eslint/parser",
3 "plugins": ["@typescript-eslint"], 3 "plugins": ["@typescript-eslint"],
4 "extends": ["airbnb-base", "plugin:@typescript-eslint/recommended"], 4 "extends": ["airbnb-base", "plugin:@typescript-eslint/recommended"],
5 "rules": {
6 "no-restricted-globals": "off",
7 "no-restricted-properties": "off",
8 "import/extensions": [
9 "error",
10 "ignorePackages",
11 {
12 "js": "never",
13 "ts": "never"
14 }
15 ]
16 },
17 "settings": {
18 "import/resolver": {
19 "node": {
20 "extensions": [".js", ".ts"]
21 }
22 }
23 },
5 "globals": { 24 "globals": {
6 "window": true, 25 "window": true,
7 "document": true, 26 "document": true,
......
...@@ -6,7 +6,7 @@ const ts = require('gulp-typescript') ...@@ -6,7 +6,7 @@ const ts = require('gulp-typescript')
6 const dist = 'miniprogram_dist' 6 const dist = 'miniprogram_dist'
7 const demoDir = 'demo' 7 const demoDir = 'demo'
8 const lessFiles = ['./src/index.less'] 8 const lessFiles = ['./src/index.less']
9 const tsFiles = ['./src/index.ts'] 9 const tsFiles = ['./src/*.ts']
10 10
11 const tsProject = ts.createProject('tsconfig.json') 11 const tsProject = ts.createProject('tsconfig.json')
12 12
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 "./node_modules/miniprogram-api-typings" 4 "./node_modules/miniprogram-api-typings"
5 ], 5 ],
6 "lib": ["ES6", "ES7"], 6 "lib": ["ES6", "ES7"],
7 "target": "es2017" 7 "target": "es2017",
8 "module": "CommonJS"
8 } 9 }
9 } 10 }
...\ No newline at end of file ...\ No newline at end of file
......