-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request !229 from 码匠君/develop
- Loading branch information
Showing
150 changed files
with
5,194 additions
and
3,037 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 |
---|---|---|
@@ -1,11 +1,8 @@ | ||
root = true | ||
[*] # 表示所有文件适用 | ||
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}] | ||
charset = utf-8 # 设置文件字符集为 utf-8 | ||
indent_style = space # 缩进风格(tab | space) | ||
indent_size = 2 # 缩进大小 | ||
end_of_line = lf # 控制换行类型(lf | cr | crlf) | ||
trim_trailing_whitespace = true # 去除行首的任意空白字符 | ||
indent_style = space # 缩进风格(tab | space) | ||
insert_final_newline = true # 始终在文件末尾插入一个新行 | ||
[*.md] # 表示仅 md 文件适用以下规则 | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
trim_trailing_whitespace = true # 去除行首的任意空白字符 | ||
end_of_line = lf # 控制换行类型(lf | cr | crlf) | ||
max_line_length = 120 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
* text=auto eol=lf |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"semi": true, | ||
"singleQuote": true, | ||
"printWidth": 100 | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"recommendations": ["Vue.volar"] | ||
"recommendations": ["Vue.volar", "dbaeumer.vscode-eslint", "EditorConfig.EditorConfig", "esbenp.prettier-vscode"] | ||
} |
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 |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
"typescript.tsdk": "node_modules\\typescript\\lib" | ||
"typescript.tsdk": "node_modules\\typescript\\lib", | ||
"explorer.fileNesting.enabled": true, | ||
"explorer.fileNesting.patterns": { | ||
"tsconfig.json": "tsconfig.*.json, env.d.ts", | ||
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*", | ||
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .stylelint*, stylelint*, .editorconfig" | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit" | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} |
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,79 @@ | ||
import js from '@eslint/js'; | ||
import globals from 'globals'; | ||
import pluginVue from 'eslint-plugin-vue'; | ||
import pluginQuasar from '@quasar/app-vite/eslint'; | ||
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'; | ||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'; | ||
|
||
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines: | ||
// import { configureVueProject } from '@vue/eslint-config-typescript' | ||
// configureVueProject({ scriptLangs: ['ts', 'tsx'] }) | ||
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup | ||
|
||
export default defineConfigWithVueTs( | ||
{ | ||
name: 'app/files-to-lint', | ||
files: ['**/*.{ts,mts,tsx,vue}'], | ||
}, | ||
|
||
{ | ||
name: 'app/files-to-ignore', | ||
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'], | ||
}, | ||
|
||
pluginQuasar.configs.recommended(), | ||
js.configs.recommended, | ||
|
||
pluginVue.configs['flat/essential'], | ||
vueTsConfigs.recommended, | ||
|
||
{ | ||
files: ['**/*.ts', '**/*.vue'], | ||
rules: { | ||
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }], | ||
}, | ||
}, | ||
|
||
{ | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
|
||
globals: { | ||
...globals.browser, | ||
...globals.node, // SSR, Electron, config files | ||
process: 'readonly', // process.env.* | ||
ga: 'readonly', // Google Analytics | ||
cordova: 'readonly', | ||
Capacitor: 'readonly', | ||
chrome: 'readonly', // BEX related | ||
browser: 'readonly', // BEX related | ||
}, | ||
}, | ||
|
||
// add your custom rules here | ||
rules: { | ||
'prefer-promise-reject-errors': 'off', | ||
|
||
// allow debugger during development only | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
|
||
'no-case-declarations': 'off', | ||
// The core 'no-unused-vars' rules (in the eslint:recommended ruleset) | ||
// does not work with type definitions | ||
'no-unused-vars': 'off', | ||
'vue/no-mutating-props': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/ban-types': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/triple-slash-reference': 'off', | ||
}, | ||
}, | ||
|
||
skipFormatting, | ||
); |
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
Oops, something went wrong.