Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ignore artifacts:
build
dist
coverage
*-lock.*
node_modules
**/build
**/dist
.github/CODEOWNERS
pnpm-lock.yaml
20 changes: 20 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"printWidth": 140,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": false,
"proseWrap": "always",
"arrowParens": "avoid",
Copy link
Contributor

@fredericbarthelet fredericbarthelet Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add as well the sort imports plugin while at it ? (you need to add @trivago/prettier-plugin-sort-imports as a dev dependency as well)

Suggested change
"arrowParens": "avoid",
"arrowParens": "avoid",
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": ["<THIRD_PARTY_MODULES>", "^../", "^./"],
"importOrderSortSpecifiers": true,
"importOrderSeparation": true,

Copy link
Contributor Author

@KKonstantinov KKonstantinov Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an eslint plugin for that I believe rather than prettier.

I also suggest introducing changes in an iterative matter, more can be done after this PR - there's further linting rules we could benefit from.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood - better via eslint and in a later stage. Wanted to avoid having again a big diff introducing a new rule (that will impact all files for sure). Can't wait for this to be merged ❤️

"overrides": [
{
"files": "**/*.md",
"options": {
"printWidth": 280
}
}
]
}
4 changes: 3 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier/flat';

export default tseslint.config(
eslint.configs.recommended,
Expand All @@ -22,5 +23,6 @@ export default tseslint.config(
rules: {
"no-console": "error"
}
}
},
eslintConfigPrettier
);
34 changes: 34 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"build:cjs:w": "npm run build:cjs -- -w",
"examples:simple-server:w": "tsx --watch src/examples/server/simpleStreamableHttp.ts --oauth",
"prepack": "npm run build:esm && npm run build:cjs",
"lint": "eslint src/",
"lint": "eslint src/ && prettier --check .",
"test": "npm run fetch:spec-types && jest",
"start": "npm run server",
"server": "tsx watch --clear-screen=false src/cli.ts server",
Expand Down Expand Up @@ -89,6 +89,8 @@
"@types/supertest": "^6.0.2",
"@types/ws": "^8.5.12",
"eslint": "^9.8.0",
"eslint-config-prettier": "^10.1.8",
"prettier": "3.6.2",
"jest": "^29.7.0",
"supertest": "^7.0.0",
"ts-jest": "^29.2.4",
Expand Down
Loading