-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 6acd63c
Showing
64 changed files
with
11,061 additions
and
0 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,3 @@ | ||
> 1% | ||
last 2 versions | ||
not dead |
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,5 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = 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,165 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
}, | ||
extends: [ | ||
'plugin:vue/vue3-essential', | ||
'@vue/standard' | ||
], | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
}, | ||
rules: { | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'vue/component-definition-name-casing': ['error', 'PascalCase'], // 组件名称驼峰式 | ||
'vue/component-name-in-template-casing': ['error', 'PascalCase', { | ||
registeredComponentsOnly: true // 仅检查已注册组件 | ||
}], // 组件标签驼峰式 | ||
'vue/mustache-interpolation-spacing': ['error', 'always'], // 插值间距 | ||
'vue/html-closing-bracket-spacing': ['error', { | ||
startTag: 'never', | ||
endTag: 'never', | ||
selfClosingTag: 'always' | ||
}], // 标签左右箭头的空格 | ||
'vue/html-self-closing': ['error', { | ||
html: { | ||
void: 'always', | ||
normal: 'never', | ||
component: 'always' | ||
}, | ||
svg: 'always', | ||
math: 'always' | ||
}], // 标签自闭合 | ||
'vue/max-attributes-per-line': ['error', { | ||
singleline: 5, | ||
multiline: { | ||
max: 1, | ||
allowFirstLine: false | ||
} | ||
}], // 每行可接受的最大属性数量 | ||
'vue/html-closing-bracket-newline': ['error', { | ||
singleline: 'never', | ||
multiline: 'always' | ||
}], // 闭合箭头的位置 | ||
'vue/html-end-tags': 'error', // 禁止标签未闭合 | ||
'vue/html-indent': ['error', 4, { | ||
attribute: 1, | ||
baseIndent: 1, | ||
closeBracket: 0, | ||
alignAttributesVertically: true, | ||
ignores: [] | ||
}], // 标签和属性的缩进 | ||
'vue/html-quotes': ['error', 'single', { | ||
avoidEscape: true | ||
}], // 属性的单双引号以及是否需要转义属性内的单双引号 | ||
'vue/attribute-hyphenation': ['error', 'always', { | ||
ignore: [] | ||
}], // 属性名:连字符 | ||
'vue/multiline-html-element-content-newline': ['error', { | ||
ignoreWhenEmpty: true, | ||
ignores: ['pre', 'textarea'], | ||
allowEmptyLines: false | ||
}], // 多行元素的内容前后自动换行对齐,禁止元素标签包裹处存在空行 | ||
'vue/no-multi-spaces': ['error', { | ||
ignoreProperties: false | ||
}], // 属性前后删除冗余空格 | ||
'vue/no-spaces-around-equal-signs-in-attribute': ['error'], // 不允许属性中等号周围有空格 | ||
'vue/attributes-order': ['error', { | ||
order: [ | ||
'DEFINITION', | ||
'LIST_RENDERING', | ||
'CONDITIONALS', | ||
'RENDER_MODIFIERS', | ||
'GLOBAL', | ||
'UNIQUE', | ||
'TWO_WAY_BINDING', | ||
'OTHER_DIRECTIVES', | ||
'OTHER_ATTR', | ||
'EVENTS', | ||
'CONTENT' | ||
], | ||
alphabetical: true | ||
}], // 标签属性排序 | ||
|
||
'vue/component-tags-order': ['error', { | ||
order: ['template', 'script', 'style'] | ||
}], // 单文件组件的顶层元素排序 | ||
'vue/order-in-components': ['error', { | ||
order: [ | ||
'el', | ||
'name', | ||
'parent', | ||
'functional', | ||
'delimiters', | ||
'comments', | ||
'components', | ||
'mixins', | ||
'directives', | ||
'filters', | ||
'extends', | ||
'inheritAttrs', | ||
'model', | ||
['props', 'propsData'], | ||
'fetch', | ||
'asyncData', | ||
'data', | ||
'computed', | ||
'watch', | ||
'LIFECYCLE_HOOKS', | ||
'methods', | ||
'head', | ||
['template', 'render'], | ||
'renderError' | ||
] | ||
}], // 组件内属性的声明顺序 | ||
'vue/this-in-template': ['error', 'never'], // 禁止在模板内使用this | ||
'vue/script-indent': ['error', 4, { | ||
baseIndent: 0, | ||
switchCase: 1, | ||
ignores: [] | ||
}], // vue组件内的script代码缩进 | ||
indent: ['error', 4], // 代码缩进 | ||
'vue/padding-line-between-blocks': ['error', 'always'], // vue组件三个顶层元素之间留空行 | ||
'vue/object-curly-spacing': ['error', 'always'], // template属性内的花括号间距,例slot-scope='{k}' => "{ k }" | ||
'vue/no-reserved-component-names': 'error', // 禁止组件名称使用保留字 | ||
'vue/match-component-file-name': ['error', { | ||
// "extensions": ["vue"], | ||
shouldMatchCase: false // 是否匹配大小写(若匹配,可能和强制大驼峰有冲突,建议false) | ||
}], // 组件名称和文件名称是否相同 | ||
'vue/v-slot-style': ['error', { | ||
atComponent: 'v-slot', | ||
default: 'shorthand', | ||
named: 'shorthand' | ||
}], // v-slot样式 | ||
|
||
'vue/v-on-style': ['error', 'shorthand'], // @on事件样式 | ||
'vue/v-bind-style': ['error', 'shorthand'], // v-bind样式 | ||
|
||
// 'vue/singleline-html-element-content-newline': ['error', { | ||
// ignoreWhenNoAttributes: true, | ||
// ignoreWhenEmpty: true, | ||
// ignores: ['pre', 'textarea'] | ||
// }], // 单行元素基于属性和内容是否换行 | ||
'vue/prop-name-casing': ['error', 'camelCase'], // props的key名驼峰式 | ||
'vue/require-prop-types': 'error', // props 必须定义类型 | ||
'vue/require-default-prop': 'error', // props 必须定义默认值 | ||
'vue/no-template-shadow': 'error', // 禁止多个v-for嵌套中出现的同名变量 | ||
'vue/valid-v-bind-sync': 'error', // sync是否有效 | ||
'vue/valid-v-slot': 'error', // v-slot是否有效 | ||
'comma-dangle': 'off', | ||
'dot-notation': 'off', | ||
'prefer-promise-reject-errors': 'off', | ||
'handle-callback-err': 'off', | ||
'quote-props': 'off', | ||
'no-prototype-builtins': 'off', | ||
'camelcase': 'off', | ||
}, | ||
overrides: [{ | ||
files: ['*.vue'], | ||
rules: { | ||
indent: 'off' // 对部分文件类型禁用缩进 | ||
} | ||
}] | ||
} |
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,22 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,69 @@ | ||
{ | ||
"git.ignoreMissingGitWarning": true, | ||
"editor.detectIndentation": false, | ||
// 一个制表符等于的空格数。该设置在 "editor.detectIndentation" 启用时根据文件内容可能会被覆盖。 | ||
"editor.tabSize": 4, | ||
"editor.formatOnType": false, | ||
"editor.formatOnPaste": false, | ||
// 控制是否在搜索中跟踪符号链接。 | ||
"search.followSymlinks": false, | ||
"editor.wordWrapColumn": 180, | ||
"editor.wordWrap": "on", // .then方法不换行 | ||
"vetur.format.options.tabSize": 4, | ||
"vetur.format.defaultFormatter.js": "vscode-typescript", | ||
"vetur.format.defaultFormatterOptions": { | ||
"prettyhtml": { | ||
"printWidth": 120, | ||
"wordWrapColumn": 120, | ||
"wrapAttributes": false, | ||
"sortAttributes": false | ||
} | ||
}, | ||
"workbench.statusBar.visible": true, | ||
"workbench.activityBar.visible": true, | ||
"html.format.wrapLineLength": 160, | ||
"html.format.wrapAttributes": "force-aligned", | ||
"[html]": { | ||
"editor.defaultFormatter": "vscode.html-language-features" | ||
}, | ||
"editor.fastScrollSensitivity": 12, | ||
"telemetry.enableCrashReporter": false, | ||
"liveServer.settings.donotShowInfoMsg": true, | ||
|
||
|
||
// eslint | ||
"eslint.options": { | ||
"configFile": ".eslintrc.js" | ||
}, | ||
"eslint.nodePath": "./", | ||
"vetur.validation.template": true, | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"eslint.probe": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"html", | ||
"vue", | ||
], | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"vue", | ||
], | ||
"eslint.run": "onSave", | ||
"eslint.format.enable": true, | ||
"[vue]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
} | ||
|
||
} |
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,24 @@ | ||
# vue3_eslint3 | ||
|
||
## Project setup | ||
``` | ||
npm install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
npm run serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
npm run build | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
npm run lint | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |
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,12 @@ | ||
module.exports = { | ||
plugins: [ | ||
['import', { | ||
libraryName: 'vant', | ||
libraryDirectory: 'es', | ||
style: true | ||
}, 'vant'] | ||
], | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset' | ||
] | ||
} |
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,37 @@ | ||
{ | ||
"name": "vue3_eslint3", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vue-cli-service serve", | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
}, | ||
"dependencies": { | ||
"core-js": "^3.6.5", | ||
"vant": "^3.0.2", | ||
"vue": "^3.0.0", | ||
"vue-router": "^4.0.0-0", | ||
"vuex": "^4.0.0-0" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "~4.5.0", | ||
"@vue/cli-plugin-eslint": "~4.5.0", | ||
"@vue/cli-plugin-router": "~4.5.0", | ||
"@vue/cli-plugin-vuex": "~4.5.0", | ||
"@vue/cli-service": "~4.5.0", | ||
"@vue/compiler-sfc": "^3.0.0", | ||
"@vue/eslint-config-standard": "^5.1.2", | ||
"babel-eslint": "^10.1.0", | ||
"babel-plugin-import": "^1.13.3", | ||
"eslint": "^6.7.2", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.0", | ||
"eslint-plugin-vue": "^7.0.0-0", | ||
"sass": "^1.26.5", | ||
"sass-loader": "^8.0.2" | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,20 @@ | ||
<!DOCTYPE html> | ||
<html lang=""> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
<style> | ||
html { font-size: 10vw; } | ||
</style> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.