Skip to content

Commit 7dc4fd5

Browse files
committed
chore: get rid of bas tsconfig, update ci and codeowners, update lint settings
1 parent ba9f69d commit 7dc4fd5

8 files changed

Lines changed: 13706 additions & 16 deletions

File tree

.github/CODEOWNERS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# AccordKit Docs
2+
# Docusaurus site (docs.accordkit.dev)
3+
4+
/docs/ @faranjit
5+
/docusaurus.config.ts @faranjit
6+
/sidebars.ts @faranjit
7+
/src/ @faranjit
8+
/static/ @faranjit
9+
/.github/workflows/ @faranjit
10+
11+
# Default owner
12+
* @faranjit

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 🧱 Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: 📦 Setup PNPM
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 10
19+
20+
- name: 🧰 Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: "pnpm"
25+
26+
- name: 📥 Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: 🧪 Lint
30+
run: pnpm run lint
31+
32+
- name: 🧱 Build
33+
run: pnpm run build

.prettierrc

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
{
2-
"$schema": "https://json.schemastore.org/prettierrc",
32
"semi": true,
43
"singleQuote": true,
5-
"trailingComma": "all",
6-
"printWidth": 100,
7-
"tabWidth": 2,
8-
"useTabs": false,
9-
"arrowParens": "always",
10-
"bracketSpacing": true,
11-
"endOfLine": "lf",
12-
"quoteProps": "as-needed",
13-
"jsxSingleQuote": false,
14-
"proseWrap": "preserve",
15-
"embeddedLanguageFormatting": "auto"
4+
"trailingComma": "es5",
5+
"printWidth": 100
166
}

eslint.config.mjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// eslint.config.mjs
2+
import js from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
import react from "eslint-plugin-react";
5+
import unused from "eslint-plugin-unused-imports";
6+
import * as mdx from "eslint-plugin-mdx";
7+
8+
export default [
9+
js.configs.recommended,
10+
...tseslint.configs.recommended,
11+
{
12+
files: ["**/*.{ts,tsx}"],
13+
languageOptions: {
14+
parser: tseslint.parser,
15+
parserOptions: {
16+
project: ["./tsconfig.json"],
17+
tsconfigRootDir: import.meta.dirname,
18+
},
19+
},
20+
plugins: { react, "unused-imports": unused },
21+
rules: {
22+
"react/react-in-jsx-scope": "off",
23+
"unused-imports/no-unused-imports": "warn",
24+
},
25+
},
26+
mdx.configs.flat,
27+
mdx.configs.flatCodeBlocks,
28+
{
29+
ignores: ["build/**", "node_modules/**", ".docusaurus/**", ".cache-loader/**"],
30+
},
31+
];

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"serve": "docusaurus serve",
1313
"write-translations": "docusaurus write-translations",
1414
"write-heading-ids": "docusaurus write-heading-ids",
15-
"typecheck": "tsc"
15+
"typecheck": "tsc",
16+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.md,.mdx --max-warnings=0",
17+
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx,.md,.mdx --fix"
1618
},
1719
"dependencies": {
1820
"@docusaurus/core": "3.9.2",
@@ -28,8 +30,15 @@
2830
"@docusaurus/plugin-content-docs": "^3.9.2",
2931
"@docusaurus/tsconfig": "3.9.2",
3032
"@docusaurus/types": "3.9.2",
33+
"@eslint/js": "^9.39.0",
34+
"eslint": "^9.39.0",
35+
"eslint-plugin-import": "^2.32.0",
36+
"eslint-plugin-mdx": "^3.6.2",
37+
"eslint-plugin-react": "^7.37.5",
38+
"eslint-plugin-unused-imports": "^4.3.0",
39+
"prettier": "^3.6.2",
3140
"typescript": "^5.9.3",
32-
"prettier": "^3.6.2"
41+
"typescript-eslint": "^8.46.2"
3342
},
3443
"browserslist": {
3544
"production": [

0 commit comments

Comments
 (0)