Skip to content

Commit b5b19d0

Browse files
committed
chore(deps): replace prettier with stylistic
1 parent f6d907f commit b5b19d0

42 files changed

Lines changed: 69 additions & 224 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: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
const stylistic = require('@stylistic/eslint-plugin');
2+
3+
const stylisticConfig = stylistic.configs.customize({
4+
semi: true,
5+
arrowParens: true,
6+
braceStyle: '1tbs',
7+
quoteProps: 'as-needed',
8+
});
9+
110
module.exports = {
211
env: {
312
node: true,
413
'jest/globals': true,
514
},
6-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
15+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
716
parser: '@typescript-eslint/parser',
817
parserOptions: {
918
project: [
@@ -12,8 +21,9 @@ module.exports = {
1221
],
1322
tsconfigRootDir: __dirname,
1423
},
15-
plugins: ['@typescript-eslint', 'import', 'prettier', 'jest'],
24+
plugins: ['@typescript-eslint', '@stylistic', 'simple-import-sort', 'import', 'jest'],
1625
ignorePatterns: [
26+
'**/node_modules/**',
1727
'**/dist/**',
1828
'**/vercel/examples/**',
1929
'**/react-native/example/**',
@@ -42,7 +52,18 @@ module.exports = {
4252
'error',
4353
{ ignoreRestSiblings: true, argsIgnorePattern: '^_', varsIgnorePattern: '^__' },
4454
],
45-
'prettier/prettier': ['error'],
55+
56+
...stylisticConfig.rules,
57+
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
58+
'simple-import-sort/imports': ['error', {
59+
groups: [
60+
['^\\u0000'],
61+
['^node:', '^(?!@launchdarkly)(?!\\.)'],
62+
['^@launchdarkly'],
63+
['^\\.'],
64+
],
65+
}],
66+
'simple-import-sort/exports': 'error',
4667
'class-methods-use-this': 'off',
4768
'import/no-extraneous-dependencies': [
4869
'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: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,16 @@
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",
76+
"@stylistic/eslint-plugin": "^4.0.0",
7877
"@typescript-eslint/eslint-plugin": "^6.20.0",
7978
"@typescript-eslint/parser": "^6.20.0",
8079
"eslint": "^8.56.0",
81-
"eslint-config-prettier": "^8.8.0",
8280
"eslint-plugin-import": "^2.27.5",
8381
"eslint-plugin-jest": "^27.6.3",
84-
"eslint-plugin-prettier": "^5.0.0",
85-
"prettier": "^3.0.0",
82+
"eslint-plugin-simple-import-sort": "^12.0.0",
8683
"typedoc": "0.25.0",
8784
"typescript": "5.1.6"
8885
},

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:fix && yarn lint && yarn build && yarn test",
3231
"test": "jest"
3332
},
3433
"files": [
@@ -48,18 +47,14 @@
4847
"@launchdarkly/server-sdk-ai": "^0.17.0",
4948
"@opentelemetry/api": "^1.9.0",
5049
"@traceloop/instrumentation-langchain": "^0.22.0",
51-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5250
"@types/jest": "^29.5.3",
5351
"@typescript-eslint/eslint-plugin": "^6.20.0",
5452
"@typescript-eslint/parser": "^6.20.0",
5553
"eslint": "^8.45.0",
56-
"eslint-config-prettier": "^8.8.0",
5754
"eslint-plugin-import": "^2.27.5",
5855
"eslint-plugin-jest": "^27.6.3",
59-
"eslint-plugin-prettier": "^5.0.0",
6056
"jest": "^29.6.1",
6157
"langchain": "^0.3.0",
62-
"prettier": "^3.0.0",
6358
"ts-jest": "^29.1.1",
6459
"tsup": "^8.5.1",
6560
"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:fix && yarn lint && yarn build && yarn test",
3231
"test": "jest"
3332
},
3433
"files": [
@@ -47,18 +46,14 @@
4746
"@launchdarkly/server-sdk-ai": "^0.17.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:fix && 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.17.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: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,25 @@
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:fix && yarn lint && yarn build && yarn test && yarn doc",
46+
"lint:fix": "yarn run lint --fix"
4747
},
4848
"devDependencies": {
4949
"@rollup/plugin-commonjs": "^25.0.0",
5050
"@rollup/plugin-node-resolve": "^15.0.2",
5151
"@rollup/plugin-terser": "^0.4.3",
5252
"@rollup/plugin-typescript": "^11.1.1",
53-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5453
"@types/crypto-js": "^4.1.1",
5554
"@types/jest": "^29.5.1",
5655
"@typescript-eslint/eslint-plugin": "^6.20.0",
5756
"@typescript-eslint/parser": "^6.20.0",
5857
"eslint": "^8.45.0",
59-
"eslint-config-prettier": "^8.8.0",
6058
"eslint-plugin-import": "^2.27.5",
6159
"eslint-plugin-jest": "^27.6.3",
62-
"eslint-plugin-prettier": "^5.0.0",
6360
"jest": "^29.5.0",
6461
"launchdarkly-js-test-helpers": "^2.2.0",
65-
"prettier": "^3.0.0",
6662
"rimraf": "^5.0.0",
6763
"rollup": "^3.23.0",
6864
"rollup-plugin-generate-package-json": "^3.2.0",

packages/sdk/akamai-edgekv/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,25 @@
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:fix && yarn lint && yarn build && yarn test && yarn doc",
46+
"lint:fix": "yarn run lint --fix"
4747
},
4848
"devDependencies": {
4949
"@rollup/plugin-commonjs": "^25.0.0",
5050
"@rollup/plugin-node-resolve": "^15.0.2",
5151
"@rollup/plugin-terser": "^0.4.3",
5252
"@rollup/plugin-typescript": "^11.1.1",
53-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5453
"@types/crypto-js": "^4.1.1",
5554
"@types/jest": "^29.5.1",
5655
"@typescript-eslint/eslint-plugin": "^6.20.0",
5756
"@typescript-eslint/parser": "^6.20.0",
5857
"eslint": "^8.45.0",
59-
"eslint-config-prettier": "^8.8.0",
6058
"eslint-plugin-import": "^2.27.5",
6159
"eslint-plugin-jest": "^27.6.3",
62-
"eslint-plugin-prettier": "^5.0.0",
6360
"jest": "^29.5.0",
6461
"launchdarkly-js-test-helpers": "^2.2.0",
65-
"prettier": "^3.0.0",
6662
"rimraf": "^5.0.0",
6763
"rollup": "^3.23.0",
6864
"rollup-plugin-generate-package-json": "^3.2.0",

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,19 @@
1111
"build": "tsc --noEmit && vite build",
1212
"lint": "eslint ./src",
1313
"start:adapter": "sdk-testharness-server adapter",
14-
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../../.prettierignore"
14+
"lint:fix": "yarn run lint --fix"
1515
},
1616
"dependencies": {
1717
"@launchdarkly/js-client-sdk": "workspace:^",
1818
"@launchdarkly/js-contract-test-utils": "workspace:^"
1919
},
2020
"devDependencies": {
21-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
2221
"@typescript-eslint/eslint-plugin": "^6.20.0",
2322
"@typescript-eslint/parser": "^6.20.0",
2423
"eslint": "^8.45.0",
25-
"eslint-config-prettier": "^8.8.0",
2624
"eslint-plugin-import": "^2.27.5",
2725
"eslint-plugin-jest": "^27.6.3",
28-
"eslint-plugin-prettier": "^5.0.0",
2926
"playwright": "^1.49.1",
30-
"prettier": "^3.0.0",
3127
"typescript": "^5.5.3",
3228
"vite": "^5.4.1"
3329
}

0 commit comments

Comments
 (0)