Skip to content

Commit

Permalink
build: improve build stack
Browse files Browse the repository at this point in the history
  • Loading branch information
neolitec authored and Kevin Manson committed Oct 4, 2024
1 parent daf3491 commit b73573f
Show file tree
Hide file tree
Showing 28 changed files with 6,117 additions and 5,886 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

115 changes: 0 additions & 115 deletions .eslintrc

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ permissions:
contents: write

jobs:
build-and-deploy:
build-and-deploy-docs:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Install and Build 🔧
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: false
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -28,13 +28,13 @@ jobs:

# The logic below handles the npm publication:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Self-hosted Renovate
uses: renovatebot/[email protected]
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
3 changes: 3 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import theme from './shiki-theme.json'

// https://astro.build/config
export default defineConfig({
server: {
host: '0.0.0.0',
},
site: 'https://neolitec.github.com/kevlar-tabs',
base: '/kevlar-tabs',
trailingSlash: 'never',
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"astro": "astro",
"deploy": "gh-pages --dist dist --dotfiles"
},
"packageManager": "[email protected]",
"dependencies": {
"@astrojs/mdx": "^0.17.0",
"@astrojs/prism": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/CopyLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function CopyLine({ copyValue, text }: CopyLineProps) {
return () => {
clearTimeout(delayId)
}
}, [copied, copyValue])
}, [copyValue])

return (
<Container>
Expand Down
1 change: 1 addition & 0 deletions docs/src/lib/extract-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import parser from 'recast/parsers/babel'
export function extractComponentContent(code: string) {
const ast = parse(code, { parser })

// eslint-disable-next-line @typescript-eslint/no-explicit-any
let jsxElementNode: any

visit(ast, {
Expand Down
47 changes: 47 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import jsxA11y from 'eslint-plugin-jsx-a11y'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [
js.configs.recommended,
...tseslint.configs.recommended,
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
],
files: ['**/*.{ts,tsx}'],
ignores: ['dist/**', 'docs/**/*.d.ts'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.browser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'jsx-a11y': jsxA11y,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
...reactHooks.configs.recommended.rules,
'no-constant-binary-expression': 'off',
'react/no-unused-prop-types': 'error',
},
},
)
Loading

0 comments on commit b73573f

Please sign in to comment.