-
Notifications
You must be signed in to change notification settings - Fork 904
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
61 changed files
with
1,259 additions
and
1,119 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 |
---|---|---|
|
@@ -6,4 +6,4 @@ VITE_BASE_URL = / | |
|
||
# enable mock in production | ||
VITE_MOCK_IN_PROD = 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 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
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
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,175 @@ | ||
import js from '@eslint/js'; | ||
import pluginVue from 'eslint-plugin-vue'; | ||
import * as parserVue from 'vue-eslint-parser'; | ||
import configPrettier from 'eslint-config-prettier'; | ||
import pluginPrettier from 'eslint-plugin-prettier'; | ||
import pluginImport from 'eslint-plugin-import'; | ||
import { defineFlatConfig } from 'eslint-define-config'; | ||
import * as parserTypeScript from '@typescript-eslint/parser'; | ||
import pluginTypeScript from '@typescript-eslint/eslint-plugin'; | ||
|
||
export default defineFlatConfig([ | ||
{ | ||
...js.configs.recommended, | ||
ignores: ['src/assets/**'], | ||
plugins: { | ||
prettier: pluginPrettier, | ||
}, | ||
rules: { | ||
...configPrettier.rules, | ||
...pluginPrettier.configs.recommended.rules, | ||
'no-debugger': 'off', | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
endOfLine: 'auto', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.?([cm])ts', '**/*.?([cm])tsx'], | ||
languageOptions: { | ||
parser: parserTypeScript, | ||
parserOptions: { | ||
sourceType: 'module', | ||
}, | ||
}, | ||
plugins: { | ||
'@typescript-eslint': pluginTypeScript, | ||
}, | ||
rules: { | ||
...pluginTypeScript.configs.strict.rules, | ||
'@typescript-eslint/ban-types': 'off', | ||
'@typescript-eslint/no-invalid-void-type': 'off', | ||
'@typescript-eslint/no-redeclare': 'error', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/prefer-ts-expect-error': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/prefer-as-const': 'warn', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-import-type-side-effects': 'error', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'error', | ||
{ disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' }, | ||
], | ||
'@typescript-eslint/prefer-literal-enum-member': ['error', { allowBitwiseExpressions: true }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.d.ts'], | ||
rules: { | ||
'eslint-comments/no-unlimited-disable': 'off', | ||
'import/no-duplicates': 'off', | ||
'unused-imports/no-unused-vars': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.?([cm])js'], | ||
rules: { | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.vue'], | ||
languageOptions: { | ||
parser: parserVue, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
extraFileExtensions: ['.vue'], | ||
parser: parserTypeScript, | ||
sourceType: 'module', | ||
}, | ||
}, | ||
plugins: { | ||
vue: pluginVue, | ||
}, | ||
processor: pluginVue.processors['.vue'], | ||
rules: { | ||
...pluginVue.configs.base.rules, | ||
...pluginVue.configs['vue3-essential'].rules, | ||
...pluginVue.configs['vue3-recommended'].rules, | ||
'no-undef': 'off', | ||
'no-unused-vars': 'off', | ||
'vue/no-v-html': 'off', | ||
'vue/require-default-prop': 'off', | ||
'vue/require-explicit-emits': 'off', | ||
'vue/multi-word-component-names': 'off', | ||
'vue/no-setup-props-reactivity-loss': 'off', | ||
'vue/html-self-closing': [ | ||
'error', | ||
{ | ||
html: { | ||
void: 'always', | ||
normal: 'always', | ||
component: 'always', | ||
}, | ||
svg: 'always', | ||
math: 'always', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.vue', '**/*.?([cm])ts', '**/*.?([cm])tsx'], | ||
plugins: { | ||
import: pluginImport, | ||
}, | ||
rules: { | ||
'import/first': 'error', | ||
'import/no-duplicates': 'error', | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index', | ||
'object', | ||
'type', | ||
], | ||
|
||
pathGroups: [ | ||
{ | ||
pattern: 'vue', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: '@vue/**', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: 'ant-design-vue', | ||
group: 'internal', | ||
}, | ||
], | ||
pathGroupsExcludedImportTypes: ['type'], | ||
}, | ||
], | ||
}, | ||
}, | ||
]); |
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.