Skip to content

Commit

Permalink
refactor: update code styles
Browse files Browse the repository at this point in the history
  • Loading branch information
woai3c committed Aug 31, 2024
1 parent 8538ed1 commit 9e3c521
Show file tree
Hide file tree
Showing 93 changed files with 10,535 additions and 9,233 deletions.
136 changes: 53 additions & 83 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,85 +1,55 @@
module.exports = {
root: true,
env: {
node: true,
},
ignorePatterns: ['iconfont.js'],
extends: [
'plugin:vue/recommended',
'@vue/airbnb',
],
parserOptions: {
parser: '@babel/eslint-parser',
},
rules: {
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'array-element-newline': ['error', 'consistent'],
indent: ['error', 4, { MemberExpression: 0, SwitchCase: 1, ignoredNodes: ['TemplateLiteral'] }],
quotes: ['error', 'single'],
'comma-dangle': ['error', 'always-multiline'],
semi: ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'max-len': ['error', 140],
'no-new': 'off',
'linebreak-style': 'off',
'import/extensions': 'off',
'eol-last': 'off',
'no-shadow': 'off',
'no-unused-vars': 'warn',
'import/no-cycle': 'off',
'arrow-parens': 'off',
eqeqeq: 'off',
'no-param-reassign': 'off',
'import/prefer-default-export': 'off',
'no-use-before-define': 'off',
'no-continue': 'off',
'prefer-destructuring': 'off',
'no-plusplus': 'off',
'prefer-const': 'off',
'global-require': 'off',
'no-prototype-builtins': 'off',
'consistent-return': 'off',
'vue/require-component-is': 'off',
'prefer-template': 'off',
'one-var-declaration-per-line': 'off',
'one-var': 'off',
'import/named': 'off',
'object-curly-newline': 'off',
'default-case': 'off',
'import/order': 'off',
'no-trailing-spaces': 'off',
'func-names': 'off',
radix: 'off',
'no-unused-expressions': 'off',
'no-underscore-dangle': 'off',
'no-nested-ternary': 'off',
'no-restricted-syntax': 'off',
'no-mixed-operators': 'off',
'no-await-in-loop': 'off',
'template-curly-spacing': 'off',
'vue/html-indent': ['error', 4, {
attribute: 1,
baseIndent: 1,
closeBracket: 0,
alignAttributesVertically: true,
ignores: [],
}],
'vue/html-self-closing': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 3,
},
multiline: {
max: 1,
},
}],
'no-return-assign': 'off',
'vue/multi-word-component-names': 'off',
'vuejs-accessibility/click-events-have-key-events': 'off',
'vuejs-accessibility/mouse-events-have-key-events': 'off',
'vuejs-accessibility/alt-text': 'off',
'vue/no-mutating-props': 'off',
},
root: true,
env: {
node: true,
},
ignorePatterns: ['iconfont.js'],
extends: ['plugin:vue/recommended', '@vue/airbnb', 'plugin:prettier/recommended'],
parserOptions: {
parser: '@babel/eslint-parser',
},
rules: {
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'array-element-newline': ['error', 'consistent'],
'no-new': 'off',
'linebreak-style': 'off',
'import/extensions': 'off',
'no-shadow': 'off',
'no-unused-vars': 'warn',
'import/no-cycle': 'off',
eqeqeq: 'off',
'no-param-reassign': 'off',
'import/prefer-default-export': 'off',
'no-use-before-define': 'off',
'no-continue': 'off',
'prefer-destructuring': 'off',
'no-plusplus': 'off',
'prefer-const': 'off',
'global-require': 'off',
'no-prototype-builtins': 'off',
'consistent-return': 'off',
'vue/require-component-is': 'off',
'one-var-declaration-per-line': 'off',
'one-var': 'off',
'import/named': 'off',
'default-case': 'off',
'import/order': 'off',
'func-names': 'off',
radix: 'off',
'no-unused-expressions': 'off',
'no-underscore-dangle': 'off',
'no-nested-ternary': 'off',
'no-restricted-syntax': 'off',
'no-mixed-operators': 'off',
'no-await-in-loop': 'off',
'vue/html-self-closing': 'off',
'vue/singleline-html-element-content-newline': 'off',
'no-return-assign': 'off',
'vue/multi-word-component-names': 'off',
'vuejs-accessibility/click-events-have-key-events': 'off',
'vuejs-accessibility/mouse-events-have-key-events': 'off',
'vuejs-accessibility/alt-text': 'off',
'vue/no-mutating-props': 'off',
},
}
12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"singleQuote": true,
"semi": false,
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"jsxSingleQuote": false,
"bracketSameLine": false,
"jsxBracketSameLine": false,
"trailingComma": "all"
}
3 changes: 0 additions & 3 deletions .stylelintignore

This file was deleted.

34 changes: 0 additions & 34 deletions .stylelintrc.js

This file was deleted.

5 changes: 1 addition & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
]
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "Vue.volar"]
}
24 changes: 6 additions & 18 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"stylelint.validate": [
"css",
"less",
"postcss",
"scss",
"sass",
"vue"
],
"files.eol": "\n",
"editor.quickSuggestions": {
"strings": true
},
"eslint.format.enable": true
}
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
一个低代码平台的前端部分,靠拖拉拽生成页面。

## 功能点

这是本项目具有的功能点,如果想了解详情请参考本项目的四篇文档,每个功能点都有不同程度的描述以及动图帮助你理解。

1. 编辑器
1. 自定义组件(文本、图片、矩形、圆形、直线、星形、三角形、按钮、表格、组合)
1. 接口请求(通过接口请求组件数据)
Expand All @@ -21,37 +24,44 @@
1. 网格线

## 在线 DEMO
* [预览入口(Github)不翻墙可能速度慢](https://woai3c.github.io/visual-drag-demo)

- [预览入口(Github)不翻墙可能速度慢](https://woai3c.github.io/visual-drag-demo)

## 文档
* [可视化拖拽组件库一些技术要点原理分析](https://github.com/woai3c/Front-end-articles/issues/19)
* [可视化拖拽组件库一些技术要点原理分析(二)](https://github.com/woai3c/Front-end-articles/issues/20)
* [可视化拖拽组件库一些技术要点原理分析(三)](https://github.com/woai3c/Front-end-articles/issues/21)
* [可视化拖拽组件库一些技术要点原理分析(四)](https://github.com/woai3c/Front-end-articles/issues/33)
* [低代码与大语言模型的探索实践](https://github.com/woai3c/Front-end-articles/issues/45)

- [可视化拖拽组件库一些技术要点原理分析](https://github.com/woai3c/Front-end-articles/issues/19)
- [可视化拖拽组件库一些技术要点原理分析(二)](https://github.com/woai3c/Front-end-articles/issues/20)
- [可视化拖拽组件库一些技术要点原理分析(三)](https://github.com/woai3c/Front-end-articles/issues/21)
- [可视化拖拽组件库一些技术要点原理分析(四)](https://github.com/woai3c/Front-end-articles/issues/33)
- [低代码与大语言模型的探索实践](https://github.com/woai3c/Front-end-articles/issues/45)

## 开发

### 安装

```
npm i
```

### 运行

```
npm run dev
```

### 打包

```
npm run build
```

## License

MIT

## 赞助

如果你觉得本项目对你的帮助很大,可以请作者喝一杯奶茶🎁😉。

![](https://github.com/woai3c/nand2tetris/blob/master/img/wx.jpg)
![](https://github.com/woai3c/nand2tetris/blob/master/img/zfb.jpg)



4 changes: 1 addition & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
presets: ['@vue/cli-plugin-babel/preset'],
}
11 changes: 2 additions & 9 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
"@/*": ["src/*"]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
}
}
Loading

0 comments on commit 9e3c521

Please sign in to comment.