Compare commits
No commits in common. "7a12b946a6efb925985537aeb3b2639a7cac5fb1" and "1be992bc34cbe8f551bbb3b55a6a67be507c1a97" have entirely different histories.
7a12b946a6
...
1be992bc34
11 changed files with 60 additions and 3152 deletions
54
.github/workflows/golangci-lint.yml
vendored
54
.github/workflows/golangci-lint.yml
vendored
|
@ -1,54 +0,0 @@
|
|||
name: golangci-lint
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
# Optional: allow read access to pull request. Use with `only-new-issues` option.
|
||||
# pull-requests: read
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.21"
|
||||
cache: false
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v4
|
||||
with:
|
||||
# Require: The version of golangci-lint to use.
|
||||
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
|
||||
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
|
||||
version: v1.54
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
working-directory: ./backend
|
||||
|
||||
# Optional: golangci-lint command line arguments.
|
||||
#
|
||||
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
|
||||
# The location of the configuration file can be changed by using `--config=`
|
||||
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
|
||||
|
||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||
# only-new-issues: true
|
||||
|
||||
# Optional: if set to true, then all caching functionality will be completely disabled,
|
||||
# takes precedence over all other caching options.
|
||||
# skip-cache: true
|
||||
|
||||
# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
|
||||
# skip-pkg-cache: true
|
||||
|
||||
# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
|
||||
# skip-build-cache: true
|
||||
|
||||
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
|
||||
# install-mode: "goinstall"
|
1
.github/workflows/node.js.yml
vendored
1
.github/workflows/node.js.yml
vendored
|
@ -32,6 +32,5 @@ jobs:
|
|||
cache: 'npm'
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
||||
|
|
|
@ -62,10 +62,6 @@ backup:
|
|||
# Format
|
||||
fmt:
|
||||
$(GOCMD) fmt ./...
|
||||
|
||||
# Lint
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
# Default target
|
||||
default: build
|
||||
|
|
|
@ -15,7 +15,7 @@ func main() {
|
|||
conf, err := config.ReadConfigFromFile("config.toml")
|
||||
if err != nil {
|
||||
conf = config.NewConfig()
|
||||
_ = conf.WriteConfigToFile("config.toml")
|
||||
conf.WriteConfigToFile("config.toml")
|
||||
}
|
||||
|
||||
// Pretty print the current config
|
||||
|
|
|
@ -104,9 +104,6 @@ func (d *Db) Migrate(dirname string) error {
|
|||
log.Println("Executed SQL file:", file.Name())
|
||||
}
|
||||
|
||||
if tr.Commit() != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tr.Commit()
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -36,9 +36,7 @@ func TestDbGetUserId(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Error("setupState failed:", err)
|
||||
}
|
||||
if db.AddUser("test", "password") != nil {
|
||||
t.Error("AddUser failed")
|
||||
}
|
||||
db.AddUser("test", "password")
|
||||
|
||||
var id int
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
'plugin:react-hooks/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
ignorePatterns: ['dist', '.eslintrc.cjs', 'tailwind.config.js', 'postcss.config.js', 'jest.config.cjs'],
|
||||
ignorePatterns: ['dist', '.eslintrc.cjs', 'tailwind.config.js', 'postcss.config.js'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['react-refresh', 'prettier'],
|
||||
rules: {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module.exports = {
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': '@swc/jest',
|
||||
},
|
||||
}
|
3115
frontend/package-lock.json
generated
3115
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -8,17 +8,13 @@
|
|||
"build": "tsc && vite build",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"preview": "vite preview",
|
||||
"format": "prettier --config .prettierrc '**/*.ts' '**/*.tsx' '**/*.js' '**/*.json' --write",
|
||||
"test": "jest"
|
||||
"format": "prettier --config .prettierrc '**/*.ts' '**/*.tsx' '**/*.js' '**/*.json' --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/core": "^1.4.2",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/react": "^18.2.55",
|
||||
"@types/react-dom": "^18.2.19",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
|
@ -31,10 +27,8 @@
|
|||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.5",
|
||||
"jest": "^29.7.0",
|
||||
"postcss": "^8.4.35",
|
||||
"prettier": "3.2.5",
|
||||
"react-test-renderer": "^18.2.0",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^5.1.0"
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
import { describe, expect, test } from "@jest/globals";
|
||||
|
||||
function sum(a: number, b: number): number {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
// This is obviously not testing the proper component
|
||||
describe("sum module", () => {
|
||||
test("adds 1 + 2 to equal 3", () => {
|
||||
expect(sum(1, 1)).toBe(2);
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue