Skip to content

Commit

Permalink
refactor(project): remove Formily.* use cases (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang authored Jul 18, 2021
1 parent a750247 commit 72a2958
Show file tree
Hide file tree
Showing 227 changed files with 1,575 additions and 4,433 deletions.
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ website
gh-pages
weex
build.ts
docs
packages/vue
packages/element
esm
doc-site
public
package
40 changes: 21 additions & 19 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:markdown/recommended"
"prettier/@typescript-eslint"
],
"globals": {
"sleep": true,
Expand All @@ -20,12 +19,7 @@
}
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"react",
"prettier",
"markdown"
],
"plugins": ["@typescript-eslint", "react", "prettier", "markdown"],
"settings": {
"react": {
"version": "detect"
Expand All @@ -34,26 +28,34 @@
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": "error"
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "error",
"react/prop-types": "off"
},
"overrides": [
{
"files": [
"**/*.md"
],
"files": ["**/*.md"],
"processor": "markdown/markdown"
},
{
"files": [
"**/*.md/*.{js,tsx}"
],
"files": ["**/*.md/*.{jsx,tsx}"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "error",
"react/display-name": "off",
"no-unused-vars": "error",
"no-console": "off"
"no-console": "off",
"react/display-name": "off",
"react/prop-types": "off"
}
},
{
"files": ["**/*.md/*.{js,ts}"],
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"no-unused-vars": "off",
"no-console": "off",
"react/display-name": "off",
"react/prop-types": "off"
}
}
]
}
}
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

blank_issues_enabled: true
contact_links:
- name: Create new issue
url: https://v2.formilyjs.org/guide/issue-helper
about: The issue which is not created via https://v2.formilyjs.org/guide/issue-helper will be closed immediately.
- name: ✨ Question Answer / Idea
- name: ✨ Question Answer / Idea
url: https://github.com/alibaba/formily/discussions/new
about: All questions can be solved here. At the same time you can provide all your ideas here.
- name: 📖 View documentation
url: https://v2.formilyjs.org
about: Official Formily documentation
about: Official Formily documentation
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:

- run: yarn -v
- run: yarn --ignore-engines
- name: ESlint
uses: reviewdog/action-eslint@v1
with:
reporter: github-check
eslint_flags: '.'
- run: yarn build
- run: yarn test:prod
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

name: Check Commit spec

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the formily_next branch
push:
branches: [ formily_next ]
branches: [formily_next]
pull_request:
branches: [ formily_next ]
branches: [formily_next]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/lint.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/package-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ doc-site
.lerna-changelog
public
.history
.lint-report.log
3 changes: 1 addition & 2 deletions designable/antd/.umirc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { resolve } from 'path'
export default {
mode: 'site',
logo:
'//img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
logo: '//img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
title: 'Formily',
hash: true,
favicon:
Expand Down
2 changes: 1 addition & 1 deletion designable/antd/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 changes: 4 additions & 13 deletions designable/antd/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@
"compilerOptions": {
"outDir": "./lib",
"paths": {
"@formily/*": [
"../*"
]
"@formily/*": ["../*"]
}
},
"include": [
"./src/**/*.ts",
"./src/**/*.tsx"
],
"exclude": [
"./src/__tests__/*",
"./esm/*",
"./lib/*",
]
}
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
}
3 changes: 1 addition & 2 deletions designable/next/.umirc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { resolve } from 'path'
export default {
mode: 'site',
logo:
'//img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
logo: '//img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
title: 'Formily',
hash: true,
favicon:
Expand Down
2 changes: 1 addition & 1 deletion designable/next/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 changes: 4 additions & 13 deletions designable/next/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@
"compilerOptions": {
"outDir": "./lib",
"paths": {
"@formily/*": [
"../*"
]
"@formily/*": ["../*"]
}
},
"include": [
"./src/**/*.ts",
"./src/**/*.tsx"
],
"exclude": [
"./src/__tests__/*",
"./esm/*",
"./lib/*",
]
}
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
}
86 changes: 86 additions & 0 deletions devtools/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint"
],
"env": {
"node": true
},
"plugins": ["@typescript-eslint", "react", "prettier", "markdown"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 10,
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"prettier/prettier": 0,
// don't force es6 functions to include space before paren
"space-before-function-paren": 0,
"react/prop-types": 0,
"react/no-find-dom-node": 0,
"react/display-name": 0,
// allow specifying true explicitly for boolean props
"react/jsx-boolean-value": 0,
"react/no-did-update-set-state": 0,
// maybe we should no-public
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-parameter-properties": 0,
"@typescript-eslint/array-type": 0,
"@typescript-eslint/no-object-literal-type-assertion": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-unused-vars": 1,
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/adjacent-overload-signatures": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/triple-slash-reference": 0,
"@typescript-eslint/no-empty-function": 0,
"no-console": [
"error",
{
"allow": ["warn", "error", "info"]
}
],
"prefer-const": 0,
"no-var": 1,
"prefer-rest-params": 0
},
"overrides": [
{
"files": ["**/*.md.{jsx,tsx}"],
"processor": "markdown/markdown"
},
{
"files": ["**/*.md/*.{jsx,tsx}"],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"no-unused-vars": "error",
"no-console": "off",
"react/display-name": "off",
"react/prop-types": "off"
}
},
{
"files": ["**/*.md/*.{js,ts}"],
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"no-unused-vars": "off",
"no-console": "off",
"react/display-name": "off",
"react/prop-types": "off"
}
}
]
}
2 changes: 1 addition & 1 deletion devtools/chrome-extension/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const fs = require('fs-extra')
import path from 'path'
import fs from 'fs-extra'

const getEntry = (src) => {
return [path.resolve(__dirname, '../src/extension/', src)]
Expand All @@ -15,7 +15,7 @@ fs.copy(
path.resolve(__dirname, '../package/manifest.json')
)

module.exports = {
export default {
mode: 'development',
devtool: 'inline-source-map', // 嵌入到源文件中
entry: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const baseConfig = require('./webpack.base')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')
const path = require('path')
import baseConfig from './webpack.base'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import webpack from 'webpack'
import path from 'path'

const PORT = 3000

Expand Down
Loading

0 comments on commit 72a2958

Please sign in to comment.