Skip to content

Commit e5e5ee4

Browse files
authored
refactor: remove prettier dependency (#1320)
This PR just removes our `prettier` dependency and its usage NOTE: if we merge this then we will have a period of time where we would not have a code formatter, this PR is isolated to break up our larger change to introduce `stylistic` and modernize our eslint implementation <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/launchdarkly/js-core/pull/1320" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open in Devin Review"> </picture> </a> <!-- devin-review-badge-end --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Tooling-only changes; main risk is CI/dev workflows no longer enforcing formatting until a replacement is added. > > **Overview** > Removes Prettier from the repo’s tooling: deletes `.prettierrc`/`.prettierignore`, drops `prettier`-related ESLint integration (config/plugin/rule) from `.eslintrc.js` and the Svelte example ESLint config, and removes `prettier`/`eslint-plugin-prettier`/`eslint-config-prettier`/import-sorting plugin deps across workspaces. > > Updates workspace `scripts` to stop running `prettier` (removes `prettier` scripts and trims `check` pipelines accordingly), plus a small cleanup removing a now-unneeded `prettier` disable comment in the browser contract-test entrypoint. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4ecfaa9. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 247ae7c commit e5e5ee4

44 files changed

Lines changed: 73 additions & 273 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
node: true,
44
'jest/globals': true,
55
},
6-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
6+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
77
parser: '@typescript-eslint/parser',
88
parserOptions: {
99
project: [
@@ -12,7 +12,7 @@ module.exports = {
1212
],
1313
tsconfigRootDir: __dirname,
1414
},
15-
plugins: ['@typescript-eslint', 'import', 'prettier', 'jest'],
15+
plugins: ['@typescript-eslint', 'import', 'jest'],
1616
ignorePatterns: [
1717
'**/dist/**',
1818
'**/vercel/examples/**',
@@ -42,7 +42,6 @@ module.exports = {
4242
'error',
4343
{ ignoreRestSiblings: true, argsIgnorePattern: '^_', varsIgnorePattern: '^__' },
4444
],
45-
'prettier/prettier': ['error'],
4645
'class-methods-use-this': 'off',
4746
'import/no-extraneous-dependencies': [
4847
'error',

.prettierignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,14 @@
7070
"test": "echo Please run tests for individual packages.",
7171
"coverage": "npm run test -- --coverage",
7272
"contract-test-harness": "curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/master/downloader/run.sh \\ | VERSION=v2 PARAMS=\"-url http://localhost:8000 -debug -stop-service-at-end $TEST_HARNESS_PARAMS\" sh",
73-
"prettier": "npx prettier --write \"**/*.{js,ts,tsx,json,yaml,yml,md}\" --log-level warn",
74-
"check": "yarn && yarn prettier && yarn lint && tsc && yarn build"
73+
"check": "yarn && yarn lint && tsc && yarn build"
7574
},
7675
"devDependencies": {
77-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
7876
"@typescript-eslint/eslint-plugin": "^6.20.0",
7977
"@typescript-eslint/parser": "^6.20.0",
8078
"eslint": "^8.56.0",
81-
"eslint-config-prettier": "^8.8.0",
8279
"eslint-plugin-import": "^2.27.5",
8380
"eslint-plugin-jest": "^27.6.3",
84-
"eslint-plugin-prettier": "^5.0.0",
85-
"prettier": "^3.0.0",
8681
"typedoc": "0.25.0",
8782
"typescript": "5.1.6"
8883
},

packages/ai-providers/server-ai-langchain/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
"scripts": {
2727
"build": "tsup-node",
2828
"lint": "npx eslint . --ext .ts",
29-
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
3029
"lint:fix": "yarn run lint --fix",
31-
"check": "yarn prettier && yarn lint && yarn build && yarn test",
30+
"check": "yarn lint && yarn build && yarn test",
3231
"test": "jest"
3332
},
3433
"files": [
@@ -47,18 +46,14 @@
4746
"@launchdarkly/server-sdk-ai": "^0.18.0",
4847
"@opentelemetry/api": "^1.9.0",
4948
"@traceloop/instrumentation-langchain": "^0.26.0",
50-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5149
"@types/jest": "^29.5.3",
5250
"@typescript-eslint/eslint-plugin": "^6.20.0",
5351
"@typescript-eslint/parser": "^6.20.0",
5452
"eslint": "^8.45.0",
55-
"eslint-config-prettier": "^8.8.0",
5653
"eslint-plugin-import": "^2.27.5",
5754
"eslint-plugin-jest": "^27.6.3",
58-
"eslint-plugin-prettier": "^5.0.0",
5955
"jest": "^29.6.1",
6056
"langchain": "^1.3.4",
61-
"prettier": "^3.0.0",
6257
"ts-jest": "^29.1.1",
6358
"tsup": "^8.5.1",
6459
"typescript": "5.1.6"

packages/ai-providers/server-ai-openai/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
"scripts": {
2727
"build": "tsup-node",
2828
"lint": "npx eslint . --ext .ts",
29-
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
3029
"lint:fix": "yarn run lint --fix",
31-
"check": "yarn prettier && yarn lint && yarn build && yarn test",
30+
"check": "yarn lint && yarn build && yarn test",
3231
"test": "jest"
3332
},
3433
"files": [
@@ -47,18 +46,14 @@
4746
"@launchdarkly/server-sdk-ai": "^0.18.0",
4847
"@opentelemetry/api": "^1.9.0",
4948
"@traceloop/instrumentation-openai": "^0.22.0",
50-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5149
"@types/jest": "^29.5.3",
5250
"@typescript-eslint/eslint-plugin": "^6.20.0",
5351
"@typescript-eslint/parser": "^6.20.0",
5452
"eslint": "^8.45.0",
55-
"eslint-config-prettier": "^8.8.0",
5653
"eslint-plugin-import": "^2.27.5",
5754
"eslint-plugin-jest": "^27.6.3",
58-
"eslint-plugin-prettier": "^5.0.0",
5955
"jest": "^29.6.1",
6056
"openai": "^5.0.0",
61-
"prettier": "^3.0.0",
6257
"ts-jest": "^29.1.1",
6358
"tsup": "^8.5.1",
6459
"typescript": "5.1.6"

packages/ai-providers/server-ai-vercel/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
"scripts": {
2727
"build": "tsup-node",
2828
"lint": "npx eslint . --ext .ts",
29-
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
3029
"lint:fix": "yarn run lint --fix",
31-
"check": "yarn prettier && yarn lint && yarn build && yarn test",
30+
"check": "yarn lint && yarn build && yarn test",
3231
"test": "jest"
3332
},
3433
"files": [
@@ -49,18 +48,14 @@
4948
"@ai-sdk/mistral": "^2.0.0",
5049
"@ai-sdk/openai": "^2.0.0",
5150
"@launchdarkly/server-sdk-ai": "^0.18.0",
52-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5351
"@types/jest": "^29.5.3",
5452
"@typescript-eslint/eslint-plugin": "^6.20.0",
5553
"@typescript-eslint/parser": "^6.20.0",
5654
"ai": "^5.0.0",
5755
"eslint": "^8.45.0",
58-
"eslint-config-prettier": "^8.8.0",
5956
"eslint-plugin-import": "^2.27.5",
6057
"eslint-plugin-jest": "^27.6.3",
61-
"eslint-plugin-prettier": "^5.0.0",
6258
"jest": "^29.6.1",
63-
"prettier": "^3.0.0",
6459
"ts-jest": "^29.1.1",
6560
"tsup": "^8.5.1",
6661
"typescript": "5.1.6"

packages/sdk/akamai-base/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,24 @@
4040
"tsw": "yarn tsc --watch",
4141
"start": "rimraf dist && yarn tsw",
4242
"lint": "eslint . --ext .ts",
43-
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
4443
"test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --ci --runInBand",
4544
"coverage": "yarn test --coverage",
46-
"check": "yarn prettier && yarn lint && yarn build && yarn test && yarn doc"
45+
"check": "yarn lint && yarn build && yarn test && yarn doc"
4746
},
4847
"devDependencies": {
4948
"@rollup/plugin-commonjs": "^25.0.0",
5049
"@rollup/plugin-node-resolve": "^15.0.2",
5150
"@rollup/plugin-terser": "^0.4.3",
5251
"@rollup/plugin-typescript": "^11.1.1",
53-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5452
"@types/crypto-js": "^4.1.1",
5553
"@types/jest": "^29.5.1",
5654
"@typescript-eslint/eslint-plugin": "^6.20.0",
5755
"@typescript-eslint/parser": "^6.20.0",
5856
"eslint": "^8.45.0",
59-
"eslint-config-prettier": "^8.8.0",
6057
"eslint-plugin-import": "^2.27.5",
6158
"eslint-plugin-jest": "^27.6.3",
62-
"eslint-plugin-prettier": "^5.0.0",
6359
"jest": "^29.5.0",
6460
"launchdarkly-js-test-helpers": "^2.2.0",
65-
"prettier": "^3.0.0",
6661
"rimraf": "^5.0.0",
6762
"rollup": "^3.23.0",
6863
"rollup-plugin-generate-package-json": "^3.2.0",

packages/sdk/akamai-edgekv/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,24 @@
4040
"tsw": "yarn tsc --watch",
4141
"start": "rimraf dist && yarn tsw",
4242
"lint": "eslint . --ext .ts",
43-
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
4443
"test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --ci --runInBand",
4544
"coverage": "yarn test --coverage",
46-
"check": "yarn prettier && yarn lint && yarn build && yarn test && yarn doc"
45+
"check": "yarn lint && yarn build && yarn test && yarn doc"
4746
},
4847
"devDependencies": {
4948
"@rollup/plugin-commonjs": "^25.0.0",
5049
"@rollup/plugin-node-resolve": "^15.0.2",
5150
"@rollup/plugin-terser": "^0.4.3",
5251
"@rollup/plugin-typescript": "^11.1.1",
53-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5452
"@types/crypto-js": "^4.1.1",
5553
"@types/jest": "^29.5.1",
5654
"@typescript-eslint/eslint-plugin": "^6.20.0",
5755
"@typescript-eslint/parser": "^6.20.0",
5856
"eslint": "^8.45.0",
59-
"eslint-config-prettier": "^8.8.0",
6057
"eslint-plugin-import": "^2.27.5",
6158
"eslint-plugin-jest": "^27.6.3",
62-
"eslint-plugin-prettier": "^5.0.0",
6359
"jest": "^29.5.0",
6460
"launchdarkly-js-test-helpers": "^2.2.0",
65-
"prettier": "^3.0.0",
6661
"rimraf": "^5.0.0",
6762
"rollup": "^3.23.0",
6863
"rollup-plugin-generate-package-json": "^3.2.0",

packages/sdk/browser/contract-tests/entity/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,19 @@
1010
"start:headless": "tsc --noEmit && vite",
1111
"build": "tsc --noEmit && vite build",
1212
"lint": "eslint ./src",
13-
"start:adapter": "sdk-testharness-server adapter",
14-
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../../.prettierignore"
13+
"start:adapter": "sdk-testharness-server adapter"
1514
},
1615
"dependencies": {
1716
"@launchdarkly/js-client-sdk": "workspace:^",
1817
"@launchdarkly/js-contract-test-utils": "workspace:^"
1918
},
2019
"devDependencies": {
21-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
2220
"@typescript-eslint/eslint-plugin": "^6.20.0",
2321
"@typescript-eslint/parser": "^6.20.0",
2422
"eslint": "^8.45.0",
25-
"eslint-config-prettier": "^8.8.0",
2623
"eslint-plugin-import": "^2.27.5",
2724
"eslint-plugin-jest": "^27.6.3",
28-
"eslint-plugin-prettier": "^5.0.0",
2925
"playwright": "^1.49.1",
30-
"prettier": "^3.0.0",
3126
"typescript": "^5.5.3",
3227
"vite": "^5.4.1"
3328
}

0 commit comments

Comments
 (0)