Skip to content

Commit

Permalink
Added: Typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
mbnuqw committed Jun 16, 2020
1 parent 42c6db0 commit 806dc0c
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 4 deletions.
35 changes: 32 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"env": {
"browser": true,
"es6": true
"es2020": true
},
"extends": ["eslint:recommended", "plugin:vue/recommended", "plugin:prettier/recommended"],
"parserOptions": {
"ecmaVersion": 2018,
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
Expand Down Expand Up @@ -42,5 +42,34 @@
"require": true,
"xdescribe": true,
"xit": true
}
},
"plugins": ["@typescript-eslint"],
"overrides": [
{
"files": ["src/**/*.ts"],

"extends": [
"eslint:recommended",
"plugin:vue/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],

"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2020,
"sourceType": "module",
"project": "tsconfig.json",
"tsconfigRootDir": "."
},
"rules": {
"@typescript-eslint/no-namespace": "off"
},
"plugins": []
}
]
}
114 changes: 113 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"@babel/plugin-proposal-object-rest-spread": "7.9.5",
"@babel/plugin-transform-modules-commonjs": "7.9.0",
"@babel/preset-env": "7.9.5",
"@typescript-eslint/eslint-plugin": "3.2.0",
"@typescript-eslint/parser": "3.2.0",
"@vue/component-compiler-utils": "3.1.2",
"eslint": "6.8.0",
"eslint-config-prettier": "6.11.0",
Expand All @@ -57,6 +59,7 @@
"pug": "2.0.4",
"regenerator-runtime": "0.13.5",
"stylus": "0.54.7",
"typescript": "3.9.5",
"vue-hot-reload-api": "2.3.4",
"vue-server-renderer": "2.6.11",
"vue-template-compiler": "2.6.11",
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"types": []
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "**/__test__/*"]
}

0 comments on commit 806dc0c

Please sign in to comment.