Skip to content

Commit

Permalink
Merge pull request #13 from WTFAcademy/dev
Browse files Browse the repository at this point in the history
version 0.0.1
  • Loading branch information
chongqiangchen authored Apr 16, 2023
2 parents 7d7426c + 4bdb9b9 commit de75ba0
Show file tree
Hide file tree
Showing 81 changed files with 2,001 additions and 1,077 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ packages/*/coverage
packages/*/test
packages/**/*.config.js
packages/**/*.config.json
**/*.config.js
apps/doc/sidebars.js
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/'],
};
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
with:
node-version: 16.x
cache: pnpm
- run: pnpm install
- run: pnpm lint
- run: pnpm install --no-frozen-lockfile
- run: pnpm lint
2 changes: 1 addition & 1 deletion .github/workflows/relesae.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
cache: pnpm

- name: Install Dependencies
run: pnpm install
run: pnpm install --no-frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
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
Loading

2 comments on commit de75ba0

@vercel
Copy link

@vercel vercel bot commented on de75ba0 Apr 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on de75ba0 Apr 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

solive-doc – ./

solive-doc-wtfacademy.vercel.app
solive-doc.vercel.app
solive-doc-git-main-wtfacademy.vercel.app

Please sign in to comment.