Skip to content

Commit

Permalink
ci: add a lot of linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Rei-x committed May 10, 2024
1 parent 2c37d48 commit a60dd0a
Show file tree
Hide file tree
Showing 21 changed files with 7,398 additions and 352 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/utils/zeus/**/*
umami.d.ts
lint-staged.config.mjs
30 changes: 30 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://json.schemastore.org/eslintrc",
"extends": [
"@alergeek-ventures/eslint-config/typescript",
"@alergeek-ventures/eslint-config/react",
"next/core-web-vitals"
],
"parser": "@typescript-eslint/parser",
"root": true,
"parserOptions": {
"project": ["./tsconfig.json"]
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"simple-import-sort/imports": "off",
"simple-import-sort/exports": "off"
},
"overrides": [
{
"files": ["pages/**/*"],
"rules": {
"import/no-default-export": "off"
}
}
]
}
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install deps
run: npm ci

- name: Format check
run: npm run format:check
if: always()

- name: Lint
run: npm run lint
if: always()

- name: Type check
run: npm run typecheck
if: always()

- name: Build
run: npm run build
if: always()

- name: Find deadcode
run: npm run knip
if: always()
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"singleQuote": false,
"semi": true,
"tabWidth": 2,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrder": [
"^@assets/(.*)$",
"<THIRD_PARTY_MODULES>",
"^@/(.*)$",
"^[./]"
]
}
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading

0 comments on commit a60dd0a

Please sign in to comment.