Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	pnpm-lock.yaml
  • Loading branch information
KieSun committed Apr 16, 2023
2 parents aa9f80b + 3df8357 commit a38ca91
Show file tree
Hide file tree
Showing 75 changed files with 1,530 additions and 1,662 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["solive-demo"],
"ignore": ["solive-demo", "solive-doc", "solive-next-demo"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
Expand Down
2 changes: 0 additions & 2 deletions .changeset/doc-plugin-and-demo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
"solive-doc": patch
"next_demo": patch
"solive-docusaurus-theme-code": patch
---

Expand Down
5 changes: 5 additions & 0 deletions .changeset/large-masks-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solive-docusaurus-theme-code": patch
---

refactor filename acquisition logic and update metastring resolve
5 changes: 5 additions & 0 deletions .changeset/nine-bottles-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solive-core": patch
---

add format code feature
5 changes: 5 additions & 0 deletions .changeset/solc-build-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solive-solc": patch
---

fix build config
43 changes: 0 additions & 43 deletions .eslintrc

This file was deleted.

130 changes: 130 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'react',
'react-hooks',
'import',
'jsx-a11y',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'airbnb',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:import/typescript',
'plugin:jsx-a11y/recommended',
],
settings: {
react: {
version: 'detect',
},
},
globals: {
Worker: true,
globalThis: true,
document: true,
JSX: true,
React: 'readonly',
localStorage: true,
HTMLElement: true,
window: true,
// 在这里添加其他全局变量
},
rules: {
// 常用规则
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-debugger': 'error',
'prefer-template': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'func-names': 'off',
'no-use-before-define': 'off',
'import/no-import-module-exports': 'off',
'no-plusplus': 'off',
'prefer-regex-literals': 'off',
'no-await-in-loop': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-bitwise': 'off',
'class-methods-use-this': 'off',
radix: 'off',
'guard-for-in': 'off',
'max-len': ['error', { code: 150 }],

// TypeScript 相关
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',

// React 相关
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/require-default-props': 'warn',
'react/no-unused-prop-types': 'warn',
'jsx-a11y/click-events-have-key-events': 'warn',

// import 相关
'import/prefer-default-export': 'off',
'import/extensions': ['error', 'never', { svg: 'always' }],
'import/order': ['error', {
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: 'react',
group: 'external',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
}],
'import/no-unresolved': [
'error',
{
ignore: ['^@theme-original', '^@docusaurus', '^@theme-init'],
},
],

// 全局变量 相关
'no-restricted-globals': ['error', {
name: 'addEventListener',
message: 'Use `self.addEventListener` instead.',
}, {
name: 'importScripts',
message: 'Use `self.importScripts` instead.',
}, {
name: 'self',
message: 'Use `globalThis` instead.',
}],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
// 在这里添加针对 TypeScript 的规则
},
},
{
files: ['*.jsx', '*.tsx'],
rules: {
// 在这里添加针对 React/JSX 的规则
},
},
{
files: ['next/**/*.js', 'next/**/*.jsx', 'next/**/*.ts', 'next/**/*.tsx'],
rules: {
// 在这里添加针对 Next.js 项目的规则
},
},
],
ignorePatterns: ['dist/', 'build/'],
};
2 changes: 1 addition & 1 deletion .github/workflows/relesae.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ jobs:
with:
publish: pnpm run build:lib
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SOLIVE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
A flexible online playground for Solidity smart contract, inspired by remix-IDE and react-live

### Demo
- Check demo website: https://solive-demo.vercel.app/
- Check demo website: https://solive.wtf

- build demo: [demo](./apps/demo)

### Todo
- [] NPM Publish
- [] Metamask Provider
- [] Finish Deploy
- [] Optimize logging system
- [] Build Mdx Component
### DOC
- Check doc website: https://solive-doc-git-dev-wtfacademy.vercel.app

- build doc: [doc](./apps/doc)

### Dev

Expand Down
2 changes: 1 addition & 1 deletion apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solive-demo",
"version": "0.1.0",
"version": "0.0.0",
"private": true,
"dependencies": {
"@craco/craco": "^7.1.0",
Expand Down
Loading

0 comments on commit a38ca91

Please sign in to comment.