Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve DX, create CI/CD pipeline #1364

Merged
merged 23 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7044954
ci: replace prettier, eslint by biome
dominik-stumpf Jul 9, 2024
1e0aae7
ci: update lint fix command
dominik-stumpf Jul 9, 2024
5a8c121
ci: remove tsc from pre-commit hook
dominik-stumpf Jul 9, 2024
4cea127
ci: add warn for noEmptyBlockStatement rule
dominik-stumpf Jul 9, 2024
9d37c74
ci: try new pre-commit hook
dominik-stumpf Jul 9, 2024
1b01dfa
ci: rename lint staged config as mjs
dominik-stumpf Jul 9, 2024
b59e7d0
ci: delete prettier and eslint config
dominik-stumpf Jul 9, 2024
5e868e8
ci: apply biome fix
dominik-stumpf Jul 9, 2024
fb39f82
ci: add biome to github actions
dominik-stumpf Jul 9, 2024
bde0281
ci: pin biome version
dominik-stumpf Jul 9, 2024
7acc7e9
ci: apply biome format
dominik-stumpf Jul 9, 2024
85ab99c
ci(fix): remove organize imports
dominik-stumpf Jul 10, 2024
a90dbb2
ci(fix): change arg order
dominik-stumpf Jul 10, 2024
fce5f0a
Merge remote-tracking branch 'origin' into dx-improvement
dominik-stumpf Jul 10, 2024
0b7031a
chore: merge main branch
dominik-stumpf Jul 10, 2024
70a96db
ci(fix): change ignore rules
dominik-stumpf Jul 10, 2024
2ccd3ac
ci: format json
dominik-stumpf Jul 10, 2024
9656e66
style: organize imports, update biome ignore config
dominik-stumpf Jul 10, 2024
d22a55e
ci: simplify biome config
dominik-stumpf Jul 10, 2024
0c43559
ci: add eslint ispired rules to biome
dominik-stumpf Jul 10, 2024
f9a890f
Revert "ci: add eslint ispired rules to biome"
dominik-stumpf Jul 10, 2024
f05b9b0
Merge branch 'main' of github.com:guildxyz/guild.xyz into dx-improvement
dominik-stumpf Jul 10, 2024
9eea73c
style: organize imports
dominik-stumpf Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

59 changes: 0 additions & 59 deletions .eslintrc.json

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Code check

on:
pull_request:
branches: ["*"]

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
- name: Run Biome
run: biome ci --reporter=github .
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npm run type-check
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc

This file was deleted.

88 changes: 88 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 85,
"attributePosition": "auto"
},
"files": {
"include": ["src", "cypress"],
"ignore": ["node_modules", ".next", "public", ".out"]
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"a11y": { "useValidAnchor": "warn" },
"complexity": {
"noBannedTypes": "error",
"noUselessConstructor": "error",
"noUselessTypeConstraint": "error",
"useLiteralKeys": "error"
},
"correctness": {
"noInvalidUseBeforeDeclaration": "off",
"noPrecisionLoss": "error",
"noUnusedVariables": "off",
"useArrayLiterals": "off",
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidConstructorSuper": "off",
"noNewSymbol": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": {
"noInferrableTypes": "error",
"noNamespace": "error",
"noNonNullAssertion": "warn",
"useAsConstAssertion": "error",
"useBlockStatements": "off",
"useDefaultParameterLast": "error",
"noArguments": "error",
"noVar": "error",
"useConst": "error"
},
"suspicious": {
"noDuplicateClassMembers": "error",
"noEmptyBlockStatements": "warn",
"noExplicitAny": "off",
"noExtraNonNullAssertion": "error",
"noMisleadingInstantiator": "error",
"noRedeclare": "error",
"useAwait": "off",
"useNamespaceKeyword": "error",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noUnsafeNegation": "off",
"useGetterReturn": "off",
"useValidTypeof": "off"
},
"nursery": {
"useSortedClasses": "info"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "es5",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "double",
"attributePosition": "auto"
}
}
}
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs"
// eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from "cypress"
import fs from "fs"

export default defineConfig({
e2e: {
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Cypress.Commands.add("clearIndexedDB", () => {
indexedDB.deleteDatabase("guild.xyz")
})

// eslint-disable-next-line @typescript-eslint/no-namespace
// biome-ignore lint/style/noNamespace: <explanation>
declare namespace Cypress {
interface Chainable {
getByDataTest(selector: string): Chainable<JQuery<HTMLElement>>
Expand Down
6 changes: 6 additions & 0 deletions lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const config = {
"*.{mjs,js,jsx,ts,tsx}": ["biome check --write"],
"*.json": ["biome format --write"],
}

export default config
Loading
Loading