-
Notifications
You must be signed in to change notification settings - Fork 2
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
93 changed files
with
3,350 additions
and
8,233 deletions.
There are no files selected for viewing
Submodule awesome
updated
30 files
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,13 @@ | ||
root = true | ||
|
||
[*] # 表示所有文件适用 | ||
charset = utf-8 # 设置文件字符集为 utf-8 | ||
indent_style = space # 缩进风格(tab | space) | ||
indent_size = 2 # 缩进大小 | ||
end_of_line = lf # 控制换行类型(lf | cr | crlf) | ||
trim_trailing_whitespace = true # 去除行首的任意空白字符 | ||
insert_final_newline = true # 始终在文件末尾插入一个新行 | ||
|
||
[*.md] # 表示仅 md 文件适用以下规则 | ||
max_line_length = off # 关闭最大行长度限制 | ||
trim_trailing_whitespace = false # 关闭末尾空格修剪 |
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 @@ | ||
src/uni_modules/ |
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,94 @@ | ||
{ | ||
"globals": { | ||
"Component": true, | ||
"ComponentPublicInstance": true, | ||
"ComputedRef": true, | ||
"EffectScope": true, | ||
"ExtractDefaultPropTypes": true, | ||
"ExtractPropTypes": true, | ||
"ExtractPublicPropTypes": true, | ||
"InjectionKey": true, | ||
"PropType": true, | ||
"Ref": true, | ||
"VNode": true, | ||
"WritableComputedRef": true, | ||
"computed": true, | ||
"createApp": true, | ||
"customRef": true, | ||
"defineAsyncComponent": true, | ||
"defineComponent": true, | ||
"effectScope": true, | ||
"getCurrentInstance": true, | ||
"getCurrentScope": true, | ||
"h": true, | ||
"inject": true, | ||
"isProxy": true, | ||
"isReactive": true, | ||
"isReadonly": true, | ||
"isRef": true, | ||
"markRaw": true, | ||
"nextTick": true, | ||
"onActivated": true, | ||
"onAddToFavorites": true, | ||
"onBackPress": true, | ||
"onBeforeMount": true, | ||
"onBeforeUnmount": true, | ||
"onBeforeUpdate": true, | ||
"onDeactivated": true, | ||
"onError": true, | ||
"onErrorCaptured": true, | ||
"onHide": true, | ||
"onLaunch": true, | ||
"onLoad": true, | ||
"onMounted": true, | ||
"onNavigationBarButtonTap": true, | ||
"onNavigationBarSearchInputChanged": true, | ||
"onNavigationBarSearchInputClicked": true, | ||
"onNavigationBarSearchInputConfirmed": true, | ||
"onNavigationBarSearchInputFocusChanged": true, | ||
"onPageNotFound": true, | ||
"onPageScroll": true, | ||
"onPullDownRefresh": true, | ||
"onReachBottom": true, | ||
"onReady": true, | ||
"onRenderTracked": true, | ||
"onRenderTriggered": true, | ||
"onResize": true, | ||
"onScopeDispose": true, | ||
"onServerPrefetch": true, | ||
"onShareAppMessage": true, | ||
"onShareTimeline": true, | ||
"onShow": true, | ||
"onTabItemTap": true, | ||
"onThemeChange": true, | ||
"onUnhandledRejection": true, | ||
"onUnload": true, | ||
"onUnmounted": true, | ||
"onUpdated": true, | ||
"provide": true, | ||
"reactive": true, | ||
"readonly": true, | ||
"ref": true, | ||
"resolveComponent": true, | ||
"shallowReactive": true, | ||
"shallowReadonly": true, | ||
"shallowRef": true, | ||
"toRaw": true, | ||
"toRef": true, | ||
"toRefs": true, | ||
"toValue": true, | ||
"triggerRef": true, | ||
"unref": true, | ||
"useAttrs": true, | ||
"useCssModule": true, | ||
"useCssVars": true, | ||
"useRequest": true, | ||
"useSlots": true, | ||
"useUpload": true, | ||
"useUpload2": true, | ||
"watch": true, | ||
"watchEffect": true, | ||
"watchPostEffect": true, | ||
"watchSyncEffect": true | ||
} | ||
} |
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,94 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:vue/vue3-essential', | ||
// eslint-plugin-import 插件, @see https://www.npmjs.com/package/eslint-plugin-import | ||
'plugin:import/recommended', | ||
// eslint-config-airbnb-base 插件 已经改用 eslint-config-standard 插件 | ||
'standard', | ||
// 1. 接入 prettier 的规则 | ||
'prettier', | ||
'plugin:prettier/recommended', | ||
'./.eslintrc-auto-import.json', | ||
], | ||
overrides: [ | ||
{ | ||
env: { | ||
node: true, | ||
}, | ||
files: ['.eslintrc.{js,cjs}'], | ||
parserOptions: { | ||
sourceType: 'script', | ||
}, | ||
}, | ||
], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
parser: '@typescript-eslint/parser', | ||
sourceType: 'module', | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'vue', | ||
// 2. 加入 prettier 的 eslint 插件 | ||
'prettier', | ||
// eslint-import-resolver-typescript 插件,@see https://www.npmjs.com/package/eslint-import-resolver-typescript | ||
'import', | ||
], | ||
rules: { | ||
// 3. 注意要加上这一句,开启 prettier 自动修复的功能 | ||
'prettier/prettier': 'error', | ||
// turn on errors for missing imports | ||
'import/no-unresolved': 'off', | ||
// 对后缀的检测,否则 import 一个ts文件也会报错,需要手动添加'.ts', 增加了下面的配置后就不用了 | ||
'import/extensions': [ | ||
'error', | ||
'ignorePackages', | ||
{ js: 'never', jsx: 'never', ts: 'never', tsx: 'never' }, | ||
], | ||
// 只允许1个默认导出,关闭,否则不能随意export xxx | ||
'import/prefer-default-export': ['off'], | ||
'no-console': ['off'], | ||
// 'no-unused-vars': ['off'], | ||
// '@typescript-eslint/no-unused-vars': ['off'], | ||
// 解决vite.config.ts报错问题 | ||
'import/no-extraneous-dependencies': 'off', | ||
'no-plusplus': 'off', | ||
'no-shadow': 'off', | ||
'vue/multi-word-component-names': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'no-underscore-dangle': 'off', | ||
'no-use-before-define': 'off', | ||
'no-undef': 'off', | ||
'no-unused-vars': 'off', | ||
'no-param-reassign': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
}, | ||
// eslint-import-resolver-typescript 插件,@see https://www.npmjs.com/package/eslint-import-resolver-typescript | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
'import/resolver': { | ||
typescript: {}, | ||
}, | ||
}, | ||
globals: { | ||
$t: true, | ||
uni: true, | ||
UniApp: true, | ||
wx: true, | ||
WechatMiniprogram: true, | ||
getCurrentPages: true, | ||
UniHelper: true, | ||
Page: true, | ||
App: true, | ||
NodeJS: true, | ||
}, | ||
} |
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
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,6 @@ | ||
# registry = https://registry.npmjs.org | ||
registry = https://registry.npmmirror.com | ||
|
||
strict-peer-dependencies=false | ||
auto-install-peers=true | ||
shamefully-hoist=true |
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,9 @@ | ||
# unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用 | ||
auto-import.d.ts | ||
|
||
# vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore | ||
uni-pages.d.ts | ||
|
||
# 插件生成的文件 | ||
src/pages.json | ||
src/manifest.json |
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,19 @@ | ||
// @see https://prettier.io/docs/en/options | ||
module.exports = { | ||
singleQuote: true, | ||
printWidth: 100, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: false, | ||
trailingComma: 'all', | ||
endOfLine: 'auto', | ||
htmlWhitespaceSensitivity: 'ignore', | ||
overrides: [ | ||
{ | ||
files: '*.json', | ||
options: { | ||
trailingComma: 'none', | ||
}, | ||
}, | ||
], | ||
} |
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 @@ | ||
src/uni_modules/ |
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,58 @@ | ||
// .stylelintrc.cjs | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
// stylelint-config-standard 替换成了更宽松的 stylelint-config-recommended | ||
'stylelint-config-recommended', | ||
// stylelint-config-standard-scss 替换成了更宽松的 stylelint-config-recommended-scss | ||
'stylelint-config-recommended-scss', | ||
'stylelint-config-recommended-vue/scss', | ||
'stylelint-config-html/vue', | ||
'stylelint-config-recess-order', | ||
], | ||
plugins: ['stylelint-prettier'], | ||
overrides: [ | ||
// 扫描 .vue/html 文件中的<style>标签内的样式 | ||
{ | ||
files: ['**/*.{vue,html}'], | ||
customSyntax: 'postcss-html', | ||
}, | ||
{ | ||
files: ['**/*.{css,scss}'], | ||
customSyntax: 'postcss-scss', | ||
}, | ||
], | ||
// 自定义规则 | ||
rules: { | ||
'prettier/prettier': true, | ||
// 允许 global 、export 、v-deep等伪类 | ||
'selector-pseudo-class-no-unknown': [ | ||
true, | ||
{ | ||
ignorePseudoClasses: ['global', 'export', 'v-deep', 'deep'], | ||
}, | ||
], | ||
'unit-no-unknown': [ | ||
true, | ||
{ | ||
ignoreUnits: ['rpx'], | ||
}, | ||
], | ||
// 处理小程序page标签不认识的问题 | ||
'selector-type-no-unknown': [ | ||
true, | ||
{ | ||
ignoreTypes: ['page'], | ||
}, | ||
], | ||
'comment-empty-line-before': 'never', // never|always|always-multi-line|never-multi-line | ||
'custom-property-empty-line-before': 'never', | ||
'no-empty-source': null, | ||
'comment-no-empty': null, | ||
'no-duplicate-selectors': null, | ||
'scss/comment-no-empty': null, | ||
'selector-class-pattern': null, | ||
'font-family-no-missing-generic-family-keyword': null, | ||
}, | ||
} |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 菲鸽 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.