Skip to content

Commit 8bb7115

Browse files
authored
chore: enforce linting (#174)
1 parent b0632f9 commit 8bb7115

31 files changed

Lines changed: 97 additions & 422 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,4 @@ jobs:
296296
working-directory: sdks/python/server
297297
env:
298298
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
299-
run: npx semantic-release
299+
run: npx semantic-release

.prettierignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules
33
dist
44
build
55
coverage
6+
venv
67

78
# Ignore package manager files (if you commit them)
89
package-lock.json
@@ -13,8 +14,11 @@ pnpm-lock.yaml
1314
# .vscode/
1415
# .idea/
1516

16-
# Ignore generated files
17+
# Ignore generated/bundled files
1718
*.generated.*
19+
*.bundled.ts
20+
docs/src/.vitepress/cache
21+
extensions/vscode/out
1822

1923
*.log
2024
*.md

docs/src/.vitepress/theme/custom.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ div[class*='language-'] code {
265265
border-right: 1px solid var(--vp-c-divider);
266266
}
267267

268-
269-
.VPSidebarItem[class*="level-"]:not(.level-0) .items {
268+
.VPSidebarItem[class*='level-']:not(.level-0) .items {
270269
padding-left: var(--items-left-padding) !important;
271270
}
272271

@@ -524,7 +523,7 @@ div[class*='language-'] code {
524523
.VPHome .VPHero {
525524
padding-top: 64px !important;
526525
}
527-
526+
528527
/* Fix overlap by resetting layout shifts on image */
529528
.VPHome .VPHero .image,
530529
.VPHome .VPHero .image-container {
@@ -537,7 +536,7 @@ div[class*='language-'] code {
537536
.VPHome .VPHero {
538537
padding-top: 32px !important;
539538
}
540-
539+
541540
.announcement-banner {
542541
margin-bottom: 0;
543542
}

eslint.config.mjs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import js from '@eslint/js';
22
import tseslint from 'typescript-eslint';
33
import react from 'eslint-plugin-react';
4+
import reactHooks from 'eslint-plugin-react-hooks';
5+
import jsxA11y from 'eslint-plugin-jsx-a11y';
46
import prettier from 'eslint-config-prettier';
57
import globals from 'globals';
68

@@ -37,6 +39,18 @@ export default tseslint.config(
3739
},
3840
},
3941

42+
// React Hooks
43+
{
44+
files: ['**/*.tsx', '**/*.jsx'],
45+
...reactHooks.configs['flat/recommended'],
46+
},
47+
48+
// Accessibility
49+
{
50+
files: ['**/*.tsx', '**/*.jsx'],
51+
...jsxA11y.flatConfigs.recommended,
52+
},
53+
4054
// TypeScript and general config
4155
{
4256
files: ['**/*.ts', '**/*.tsx'],
@@ -46,8 +60,7 @@ export default tseslint.config(
4660
globals: {
4761
...globals.node,
4862
...globals.browser,
49-
...globals.es2021,
50-
...globals.jest,
63+
...globals.es2025,
5164
},
5265
parserOptions: {
5366
ecmaFeatures: {
@@ -57,6 +70,13 @@ export default tseslint.config(
5770
},
5871
rules: {
5972
'react/prop-types': 'off',
73+
'@typescript-eslint/consistent-type-imports': [
74+
'error',
75+
{
76+
prefer: 'type-imports',
77+
fixStyle: 'inline-type-imports',
78+
},
79+
],
6080
'@typescript-eslint/no-unused-vars': [
6181
'error',
6282
{

examples/mcp-apps-demo/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ app.post('/mcp', async (req, res) => {
389389
// This tells MCP Apps hosts where to find the UI
390390
_meta: {
391391
ui: {
392-
resourceUri: weatherDashboardUI.resource.uri
393-
}
392+
resourceUri: weatherDashboardUI.resource.uri,
393+
},
394394
},
395395
},
396396
async ({ location }) => {

lefthook.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pre-commit:
22
parallel: true
3+
stage_fixed: true
34
jobs:
45
- name: lint typescript
56
glob: '*.{ts,tsx}'

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"coverage": "vitest run --coverage",
1414
"lint": "eslint .",
1515
"lint:fix": "eslint . --fix",
16-
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
16+
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md,yaml,yml,css,scss}\"",
1717
"version:patch": "echo \"Versioning with Changesets, then run pnpm install\" && pnpm changeset version && pnpm install --lockfile-only",
1818
"publish-packages": "pnpm build && pnpm changeset publish",
1919
"docs:dev": "vitepress dev docs/src",
@@ -34,19 +34,14 @@
3434
"@testing-library/react": "^14.1.2",
3535
"@types/jest": "^29.5.11",
3636
"@types/node": "^22.15.18",
37-
"@typescript-eslint/eslint-plugin": "^8.49.0",
38-
"@typescript-eslint/parser": "^8.49.0",
3937
"@vitejs/plugin-react-swc": "^4.2.2",
4038
"c8": "^10.1.3",
4139
"eslint": "^9.39.1",
4240
"eslint-config-prettier": "^10.1.8",
43-
"eslint-plugin-jest": "^27.6.0",
4441
"eslint-plugin-jsx-a11y": "^6.8.0",
45-
"eslint-plugin-prettier": "^5.5.4",
4642
"eslint-plugin-react": "^7.37.5",
4743
"eslint-plugin-react-hooks": "^7.0.1",
4844
"globals": "^16.0.0",
49-
"husky": "^9.1.7",
5045
"jsdom": "^25.0.1",
5146
"prettier": "^3.7.4",
5247
"prettier-plugin-tailwindcss": "^0.7.2",

0 commit comments

Comments
 (0)