-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
138 changed files
with
55,461 additions
and
10,698 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:vue/vue3-recommended', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
parser: '@typescript-eslint/parser', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['vue', '@typescript-eslint'], | ||
rules: { | ||
// js/ts | ||
'eol-last': 'error', | ||
'no-trailing-spaces': 'error', | ||
'comma-style': ['error', 'last'], | ||
// 'comma-dangle': ['error', 'always-multiline'], | ||
quotes: [ | ||
'error', | ||
'single', | ||
{ avoidEscape: true, allowTemplateLiterals: true }, | ||
], | ||
camelcase: ['error', { properties: 'never' }], | ||
semi: ['error', 'never'], | ||
indent: ['error', 2, { SwitchCase: 1 }], | ||
'object-curly-spacing': ['error', 'always'], | ||
'arrow-parens': ['error', 'as-needed'], | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/member-delimiter-style': [ | ||
'error', | ||
{ | ||
multiline: { | ||
delimiter: 'none', | ||
requireLast: false, | ||
}, | ||
singleline: { | ||
delimiter: 'semi', | ||
requireLast: true, | ||
}, | ||
}, | ||
], | ||
'@typescript-eslint/no-this-alias': 'off', | ||
// vue | ||
'vue/no-v-html': 'off', | ||
'vue/singleline-html-element-content-newline': 'off', | ||
'vue/html-self-closing': [ | ||
'error', | ||
{ | ||
html: { | ||
void: 'never', | ||
normal: 'never', | ||
component: 'always', | ||
}, | ||
}, | ||
], | ||
'vue/max-attributes-per-line': [ | ||
'error', | ||
{ | ||
singleline: 4, | ||
multiline: 1, | ||
}, | ||
], | ||
'vue/require-default-prop': 'off', | ||
'vue/html-closing-bracket-spacing': 'error', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ node_modules | |
.DS_Store | ||
dist | ||
dist-ssr | ||
*.local | ||
*.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# element-plus-vite-starter | ||
|
||
> A starter kit for vue-cesium generated by vue-cli | ||
<p align="center"> | ||
<img width="300px" src="https://zouyaoji.top/vue-cesium/favicon.png"> | ||
</p> | ||
|
||
|
||
This template should help get you started developing with Vue 3 and Typescript in Vite. | ||
|
||
## Recommended IDE Setup | ||
|
||
[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings! | ||
|
||
### If Using `<script setup>` | ||
|
||
[`<script setup>`](https://github.com/vuejs/rfcs/pull/227) is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) instead of Vetur (and disable Vetur). | ||
|
||
## Type Support For `.vue` Imports in TS | ||
|
||
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can use the following: | ||
|
||
### If Using Volar | ||
|
||
Run `Volar: Switch TS Plugin on/off` from VSCode command palette. | ||
|
||
### If Using Vetur | ||
|
||
1. Install and add `@vuedx/typescript-plugin-vue` to the [plugins section](https://www.typescriptlang.org/tsconfig#plugins) in `tsconfig.json` | ||
2. Delete `src/shims-vue.d.ts` as it is no longer needed to provide module info to Typescript | ||
3. Open `src/main.ts` in VSCode | ||
4. Open the VSCode command palette | ||
5. Search and run "Select TypeScript version" -> "Use workspace version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.