-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
92 changed files
with
4,341 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length=88 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
!.dumi | ||
.dumi/tmp | ||
.dumi/tmp-production | ||
|
||
**/dist/**/*.js | ||
**/dist/**/*.cjs | ||
**/dist/**/*.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:promise/recommended', | ||
'prettier', | ||
], | ||
plugins: ['import'], | ||
|
||
env: { | ||
node: true, | ||
}, | ||
settings: { | ||
react: { | ||
version: '18', | ||
}, | ||
}, | ||
|
||
rules: { | ||
// common pitfalls | ||
eqeqeq: 'error', | ||
curly: 'error', | ||
|
||
// stricter type correctness | ||
'no-unused-vars': [ | ||
'warn', | ||
{ | ||
vars: 'local', | ||
args: 'none', | ||
destructuredArrayIgnorePattern: '^_', | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_', | ||
caughtErrors: 'none', | ||
}, | ||
], | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }], | ||
'@typescript-eslint/no-shadow': [ | ||
'warn', | ||
{ | ||
ignoreTypeValueShadow: true, | ||
}, | ||
], | ||
|
||
// react rules | ||
'react-hooks/exhaustive-deps': 'error', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react/jsx-uses-react': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
|
||
// no sloppiness | ||
'no-console': ['error', { allow: ['error', 'warn', 'info'] }], | ||
|
||
// import rules and fixes | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'import/newline-after-import': 'warn', | ||
'import/order': [ | ||
'warn', | ||
{ | ||
pathGroups: [ | ||
{ | ||
pattern: '@/**', | ||
group: 'internal', | ||
position: 'before', | ||
}, | ||
], | ||
distinctGroup: false, | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index', | ||
'object', | ||
], | ||
'newlines-between': 'always', | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ['*.js', '*.cjs', '*.mjs', '*.jsx'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [require.resolve('./.eslintrc.js')], | ||
rules: { | ||
'no-console': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Fix end-of-lines in Git versions older than 2.10 | ||
# https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248 # https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248 | ||
* text=auto eol=lf | ||
|
||
# === | ||
# Binary Files (don't diff, don't fix line endings) | ||
# === | ||
|
||
# Images | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.tiff binary | ||
|
||
# Fonts | ||
*.oft binary | ||
*.ttf binary | ||
*.eot binary | ||
*.woff binary | ||
*.woff2 binary | ||
|
||
# Videos | ||
*.mov binary | ||
*.mp4 binary | ||
*.webm binary | ||
*.ogg binary | ||
*.mpg binary | ||
*.3gp binary | ||
*.avi binary | ||
*.wmv binary | ||
*.flv binary | ||
*.asf binary | ||
|
||
# Audio | ||
*.mp3 binary | ||
*.wav binary | ||
*.flac binary | ||
|
||
# Compressed | ||
*.gz binary | ||
*.zip binary | ||
*.7z binary | ||
*.tar.gz binary | ||
*.tgz binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Code: CI' | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
workflow_call: | ||
|
||
jobs: | ||
ci-javascript: | ||
name: 'CI: JavaScript' | ||
uses: difizen/actions/.github/workflows/ci-javascript.yml@main | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
python-version: ${{ matrix.python-version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: ['16'] | ||
python-version: ['3.8'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# # https://github.com/sveltejs/kit/blob/32afba695088b946aefe96da75b36de9b0667fbe/.github/workflows/release.yml | ||
# name: 'Release' | ||
|
||
# on: | ||
# push: | ||
# branches: ['main'] | ||
|
||
# jobs: | ||
# changesets: | ||
# # prevents this action from running on forks | ||
# if: github.repository == 'difizen/magent' | ||
|
||
# name: Changesets | ||
# uses: difizen/actions/.github/workflows/release-changesets.yml@main | ||
# secrets: | ||
# BOT_APP_ID: ${{ secrets.BOT_APP_ID }} | ||
# BOT_PRIVATE_KEY: ${{ secrets.BOT_PRIVATE_KEY }} | ||
|
||
# permissions: | ||
# pull-requests: write | ||
# contents: write | ||
|
||
# ci: | ||
# needs: [changesets] | ||
# if: | | ||
# needs.changesets.outputs.should-release == 'true' | ||
|
||
# name: Prerelease CI | ||
# uses: ./.github/workflows/ci.yml | ||
|
||
# permissions: | ||
# contents: read | ||
# actions: read | ||
|
||
# publish: | ||
# needs: [ci] | ||
# if: | | ||
# needs.ci.result == 'success' | ||
|
||
# name: Publish | ||
# uses: difizen/actions/.github/workflows/release-publish.yml@main | ||
|
||
# with: | ||
# node-version: '18' | ||
# python-version: '3.8' | ||
|
||
# permissions: | ||
# contents: write | ||
|
||
# secrets: | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
Oops, something went wrong.