Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
伍浩威 committed Oct 25, 2021
0 parents commit f76bd58
Showing 2,721 changed files with 319,298 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [0, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'header-max-length': [0, 'always', 120],
},
};
15 changes: 15 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/build/*.js
dist/
/public/*.js
/output/*.js
**/adapter.js
**/*.stories.js
**/*.test.js
**/*.d.ts
**/_story/*.stories.tsx
**/_story/*.stories.jsx
packages/semi-theme-default/css/semi.css
**/css/semi.css
packages/**/lib/
packages/**/dist/

69 changes: 69 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* eslint-disable */
module.exports = {
env: {
'jest/globals': true,
'browser': true,
'node': true
},
settings: {
react: {
"version": "detect"
}
},
overrides: [
{
files: ['*.js', '*.jsx'],
extends: ['jest-enzyme', 'plugin:react/recommended', 'plugin:import/recommended', 'plugin:import/errors', 'plugin:import/warnings'],
parser: '@babel/eslint-parser',
plugins: ['react', 'react-hooks', 'jest', 'import'],
rules: {
// 因为历史原因,现有项目基本全部是4个空格
indent: ['error', 4, { 'SwitchCase': 1 }],
'react/display-name': 'off',
'react/jsx-indent': ['error', 4],
'react/jsx-indent-props': ['error', 4],
'react/prefer-stateless-function': ['warn'],
'react/no-find-dom-node': ['warn'],
'react/prop-types': 'off',
'react/prefer-stateless-function': 'off',
'operator-linebreak': ['warn', 'after', { 'overrides': { '?': 'before', ':': 'before' } }],
'import/no-unresolved': 'off'
},
globals: {
"sinon": "readonly",
},
},
{
files: ['*.ts', '*.tsx'],
extends: ['jest-enzyme', 'plugin:@typescript-eslint/recommended', 'plugin:import/typescript', 'plugin:react/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.eslint.json'],
},
plugins: ['react', 'jest', 'react-hooks', 'import', '@typescript-eslint'],
rules: {
// 因为历史原因,现有项目基本全部是4个空格
indent: 'off',
'@typescript-eslint/indent': ['error', 4],
'react/display-name': 'off',
'react/jsx-indent': ['error', 4],
'react/jsx-indent-props': ['error', 4],
'react/prefer-stateless-function': ['warn'],
'react/no-find-dom-node': ['warn'],
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/prefer-stateless-function': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-this-alias': 'off',
'import/no-unresolved': 'off'
}
},
],
};
229 changes: 229 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
.tpl-temp
server/log/
server/view/
# expo
.expo/

# json
static/search_data_client.json
search/data_client.json
static/changeLog.json
static/designToken.json

# dependencies
/node_modules
packages/**/node_modules

# output
.build_temp
output
dist
build
_site
packages/**/lib
packages/semi-theme-default/css/semi.css
packages/semi-theme-default/semi.scss
public
storybook-static/
*.zip

# misc
.env.local
.env.development.local
.env.test.local
.env.production.local

### Bower ###
bower_components
.bower-cache
.bower-registry
.bower-tmp

### Git ###
*.orig

### Linux ###
*~

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# node-waf configuration
.lock-wscript
yarn.lock
package-lock.json

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

### ReactNative.Gradle Stack ###
.gradle
/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

### ReactNative.Buck Stack ###
buck-out/
.buckconfig.local
.buckd/
.buckversion
.fakebuckversion

### ReactNative.Android Stack ###
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
gen/
out/

# Gradle files
.gradle/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
.idea
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

### SVN ###
.svn/

### VisualStudioCode ###
# .vscode/

# metro
tmp

# test
/__snapshots__/
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
electron_mirror=https://npm.taobao.org/mirrors/electron/
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
proseWrap: 'never',
printWidth: 120,
tabWidth: 4,
trailingComma: 'es5',
bracketSpacing: true,
singleQuote: true,
useTabs: false,
semi: true,
};
12 changes: 12 additions & 0 deletions .storybook/animation/react/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const config = require('../../base/base');

module.exports = {
...config,
"stories": [
'../../../packages/(semi-animation-react|semi-animation-styled)/_story/*.react.stories.(js|jsx)',
],
typescript: {
check: false,
checkOptions: {}
},
};
Loading

0 comments on commit f76bd58

Please sign in to comment.