Skip to content

Commit

Permalink
💄 style(project): remove some useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
ishareme committed Jan 5, 2023
1 parent 28cce27 commit ba46ab2
Show file tree
Hide file tree
Showing 81 changed files with 5,588 additions and 207 deletions.
8 changes: 8 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# just a flag
ENV = 'development'

# base api
VITE_BASE_API = '/api'

# mc api
VITE_MC_API = '/mc'
8 changes: 8 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# just a flag
ENV = 'production'

# base api
VITE_BASE_API = 'https://api.pexels.com/v1/'

# mc api
VITE_MC_API = 'https://imooc-front.lgdsunday.club/prod-api/'
25 changes: 19 additions & 6 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ module.exports = {
env: {
// 在 node 环境下启动 ESLint 检测
node: true,
browser: true
browser: true,
},
extends: ['eslint:recommended', 'plugin:vue/vue3-essential'],
overrides: [],
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false, // <== ADD THIS
ecmaVersion: 6,
sourceType: 'module'
sourceType: 'module',
},
plugins: ['vue'],
// 需要修改的启用规则及其各自的错误级别
Expand All @@ -25,17 +25,30 @@ module.exports = {
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'never',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'vue/no-parsing-error': [2, { 'x-invalid-end-tag': false }],
'space-before-function-paren': 'off',
'vue/multi-word-component-names': 'off',
'vue/valid-v-slot': [
'off',
{
allowModifiers: false
}
allowModifiers: false,
},
],
'comma-dangle': 'off',
semi: ['error', 'always'],
indent: ['error', 4],
quotes: 'off'
}
quotes: 'off',
},
};
3 changes: 1 addition & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "none"
"singleQuote": true
}
Loading

0 comments on commit ba46ab2

Please sign in to comment.