-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 289242a
Showing
37 changed files
with
8,457 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,138 @@ | ||
# Swap files | ||
*.swp | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env | ||
build | ||
develop-eggs | ||
dist | ||
downloads | ||
eggs | ||
.eggs | ||
lib | ||
lib64 | ||
parts | ||
sdist | ||
var | ||
*.egg-info | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov | ||
.tox | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build | ||
|
||
# PyBuilder | ||
target | ||
|
||
#Ipython Notebook | ||
.ipynb_checkpoints | ||
|
||
# SASS cache | ||
.sass-cache | ||
media_test | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# 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 | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Typescript v1 declaration files | ||
typings | ||
|
||
# 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 | ||
.env* | ||
|
||
# Sensitive Deploy Files | ||
deploy/eb/ | ||
|
||
# tox | ||
./.tox |
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,2 @@ | ||
node_modules/ | ||
build/ |
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,112 @@ | ||
const config = { | ||
env: { | ||
node: true, | ||
browser: true, | ||
es2020: true, | ||
}, | ||
root: true, | ||
extends: [ | ||
'airbnb', | ||
'airbnb/hooks', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'react-refresh', | ||
'simple-import-sort', | ||
'import-newlines' | ||
], | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'] | ||
}, | ||
'import/resolver': { | ||
typescript: { | ||
project: [ | ||
'./tsconfig.json', | ||
], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'react-refresh/only-export-components': 'warn', | ||
|
||
'no-unused-vars': 0, | ||
'@typescript-eslint/no-unused-vars': 1, | ||
|
||
'no-use-before-define': 0, | ||
'@typescript-eslint/no-use-before-define': 1, | ||
|
||
'no-shadow': 0, | ||
'@typescript-eslint/no-shadow': ['error'], | ||
|
||
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }], | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
devDependencies: [ | ||
'**/*.test.{ts,tsx}', | ||
'eslint.config.js', | ||
'postcss.config.cjs', | ||
'stylelint.config.cjs', | ||
'vite.config.ts', | ||
], | ||
optionalDependencies: false, | ||
}, | ||
], | ||
|
||
indent: ['error', 4, { SwitchCase: 1 }], | ||
|
||
'import/no-cycle': ['error', { allowUnsafeDynamicCyclicDependency: true }], | ||
|
||
'react/react-in-jsx-scope': 'off', | ||
'camelcase': 'off', | ||
|
||
'react/jsx-indent': ['error', 4], | ||
'react/jsx-indent-props': ['error', 4], | ||
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx', '.ts', '.tsx'] }], | ||
|
||
'import/extensions': ['off', 'never'], | ||
|
||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
|
||
'react/require-default-props': ['warn', { ignoreFunctionalComponents: true }], | ||
'simple-import-sort/imports': 'warn', | ||
'simple-import-sort/exports': 'warn', | ||
'import-newlines/enforce': ['warn', 1] | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.js', '*.jsx', '*.ts', '*.tsx'], | ||
rules: { | ||
'simple-import-sort/imports': [ | ||
'error', | ||
{ | ||
'groups': [ | ||
// side effect imports | ||
['^\\u0000'], | ||
// packages `react` related packages come first | ||
['^react', '^@?\\w'], | ||
// internal packages | ||
['^#.+$'], | ||
// parent imports. Put `..` last | ||
// other relative imports. Put same-folder imports and `.` last | ||
['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], | ||
// style imports | ||
['^.+\\.json$', '^.+\\.module.css$'], | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; | ||
|
||
module.exports = config; |
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,139 @@ | ||
name: Lint, Build and Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'develop' | ||
|
||
env: | ||
APP_TITLE: ${{ vars.APP_TITLE }} | ||
GITHUB_WORKFLOW: true | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run test | ||
run: pnpm test | ||
unused: | ||
name: Find unused things | ||
environment: 'test' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run knip | ||
run: pnpm lint:unused | ||
lint-js: | ||
name: Lint JS | ||
environment: 'test' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Lint Javascript | ||
run: pnpm lint:js | ||
css-lint: | ||
name: Lint CSS | ||
environment: 'test' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Css Lint | ||
run: pnpm lint:css | ||
typecheck: | ||
name: Typecheck | ||
environment: 'test' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Lint Javascript | ||
run: pnpm typecheck | ||
build: | ||
name: Build | ||
environment: 'test' | ||
needs: [lint-js, css-lint, typecheck] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm build |
Oops, something went wrong.