From dee076443ab1e1e44994b562f52f0b07bf8a8d0f Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Wed, 4 Oct 2023 01:37:02 -0700 Subject: [PATCH] More lint cleanup and some tests --- .scratch/todo.md | 4 + .../plugin-node-resolve/.eslintrc.json | 28 +-- @types/ansicolor/.eslintrc.json | 28 +-- .../.eslintrc.json | 28 +-- @types/shell-escape-tag/.eslintrc.json | 28 +-- @types/shell-split/.eslintrc.json | 28 +-- demos/preact-hello-world/.eslintrc.json | 36 +--- demos/preact/.eslintrc.json | 36 +--- demos/react-jsnation-workshop/.eslintrc.json | 36 +--- demos/react-jsnation/.eslintrc.json | 36 +--- demos/react-jsnation/tests/.eslintrc.json | 27 +-- demos/react-lite-query/.eslintrc.json | 36 +--- demos/react-query/.eslintrc.json | 36 +--- demos/react-stock-ticker/.eslintrc.json | 36 +--- demos/react-store/.eslintrc.json | 36 +--- demos/react/.eslintrc.json | 36 +--- .../preact-testing-utils/.eslintrc.json | 28 +-- .../preact-testing-utils/tests/.eslintrc.json | 27 +-- packages/preact/preact-utils/.eslintrc.json | 28 +-- .../preact/preact-utils/tests/.eslintrc.json | 27 +-- packages/preact/preact/.eslintrc.json | 28 +-- packages/preact/preact/tests/.eslintrc.json | 27 +-- packages/react/react/.eslintrc.json | 28 +-- packages/react/react/tests/.eslintrc.json | 27 +-- packages/react/test-utils/.eslintrc.json | 28 +-- .../react/use-strict-lifecycle/.eslintrc.json | 28 +-- .../use-strict-lifecycle/tests/.eslintrc.json | 27 +-- packages/universal/collections/.eslintrc.json | 28 +-- .../collections/tests/.eslintrc.json | 27 +-- packages/universal/core-utils/.eslintrc.json | 28 +-- .../universal/core-utils/tests/.eslintrc.json | 27 +-- packages/universal/core/.eslintrc.json | 28 +-- packages/universal/debug/.eslintrc.json | 28 +-- packages/universal/debug/tests/.eslintrc.json | 27 +-- packages/universal/interfaces/.eslintrc.json | 28 +-- packages/universal/modifier/.eslintrc.json | 28 +-- packages/universal/reactive/.eslintrc.json | 28 +-- .../universal/reactive/tests/.eslintrc.json | 27 +-- packages/universal/renderer/.eslintrc.json | 28 +-- .../universal/renderer/tests/.eslintrc.json | 27 +-- packages/universal/resource/.eslintrc.json | 28 +-- .../universal/resource/tests/.eslintrc.json | 27 +-- packages/universal/runtime/.eslintrc.json | 28 +-- .../universal/runtime/tests/.eslintrc.json | 27 +-- packages/universal/service/.eslintrc.json | 28 +-- .../universal/service/tests/.eslintrc.json | 27 +-- packages/universal/shared/.eslintrc.json | 28 +-- .../universal/shared/tests/.eslintrc.json | 27 +-- packages/universal/tags/.eslintrc.json | 28 +-- packages/universal/universal/.eslintrc.json | 28 +-- .../universal/universal/tests/.eslintrc.json | 27 +-- packages/universal/verify/.eslintrc.json | 28 +-- .../universal/verify/tests/.eslintrc.json | 27 +-- packages/vue/vue-testing-utils/.eslintrc.json | 28 +-- .../vue-testing-utils/tests/.eslintrc.json | 27 +-- packages/vue/vue/.eslintrc.json | 28 +-- packages/vue/vue/tests/.eslintrc.json | 27 +-- packages/x/devtool/.eslintrc.json | 28 +-- packages/x/headless-form/.eslintrc.json | 28 +-- packages/x/store/.eslintrc.json | 28 +-- packages/x/store/tests/.eslintrc.json | 27 +-- packages/x/vanilla/.eslintrc.json | 28 +-- packages/x/vanilla/tests/.eslintrc.json | 27 +-- pnpm-lock.yaml | 32 ++-- workspace/@domtree/any/.eslintrc.json | 28 +-- workspace/@domtree/browser/.eslintrc.json | 28 +-- workspace/@domtree/flavors/.eslintrc.json | 28 +-- workspace/@domtree/interface/.eslintrc.json | 28 +-- workspace/@domtree/minimal/.eslintrc.json | 28 +-- workspace/build/.eslintrc.json | 28 +-- workspace/edit-json/.eslintrc.json | 28 +-- workspace/edit-json/index.ts | 3 + workspace/edit-json/package.json | 3 - workspace/edit-json/src/diagnostics.ts | 6 - workspace/edit-json/src/edits/edits.ts | 30 ---- .../src/jsonc/representation/node.ts | 15 -- .../edit-json/src/representation/node.ts | 6 - .../src/representation/nodes/convert.ts | 8 - .../src/representation/nodes/utils.ts | 18 +- workspace/edit-json/src/stringify.ts | 20 ++- workspace/edit-json/tests/.eslintrc.json | 27 +-- workspace/eslint/.eslintrc.json | 28 +-- workspace/json/.eslintrc.json | 28 +-- workspace/misc/.eslintrc.json | 28 +-- workspace/package/.eslintrc.json | 28 +-- workspace/paths/.eslintrc.json | 28 +-- workspace/paths/index.ts | 6 +- workspace/paths/package.json | 7 +- workspace/paths/src/paths.ts | 50 +----- workspace/paths/src/utils.ts | 161 ++++++++++++++++++ workspace/paths/tests/.eslintrc.json | 18 ++ workspace/paths/tests/.npmrc | 2 + workspace/paths/tests/CHANGELOG.md | 7 + workspace/paths/tests/directory.spec.ts | 5 + workspace/paths/tests/package.json | 21 +++ workspace/paths/tests/tsconfig.json | 13 ++ workspace/reporter/.eslintrc.json | 28 +-- workspace/schemas/.eslintrc.json | 29 +--- workspace/scripts/.eslintrc.json | 28 +-- workspace/shared/.eslintrc.json | 28 +-- workspace/test-utils/.eslintrc.json | 28 +-- workspace/unstable-release/.eslintrc.json | 28 +-- workspace/utils/.eslintrc.json | 28 +-- workspace/workspace/.eslintrc.json | 28 +-- 104 files changed, 791 insertions(+), 2019 deletions(-) create mode 100644 .scratch/todo.md create mode 100644 workspace/paths/src/utils.ts create mode 100644 workspace/paths/tests/.eslintrc.json create mode 100644 workspace/paths/tests/.npmrc create mode 100644 workspace/paths/tests/CHANGELOG.md create mode 100644 workspace/paths/tests/directory.spec.ts create mode 100644 workspace/paths/tests/package.json create mode 100644 workspace/paths/tests/tsconfig.json diff --git a/.scratch/todo.md b/.scratch/todo.md new file mode 100644 index 00000000..71ca3d46 --- /dev/null +++ b/.scratch/todo.md @@ -0,0 +1,4 @@ +When running a query command, provide some progress indication as the commands +go by. + +Invesitgate why `vitest` doesn't exist on import.meta. \ No newline at end of file diff --git a/@types/@rollup/plugin-node-resolve/.eslintrc.json b/@types/@rollup/plugin-node-resolve/.eslintrc.json index 9c98e0bc..069f98c4 100644 --- a/@types/@rollup/plugin-node-resolve/.eslintrc.json +++ b/@types/@rollup/plugin-node-resolve/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.d.ts", - "src/**/*.d.ts" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.d.ts", "src/**/*.d.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/@types/ansicolor/.eslintrc.json b/@types/ansicolor/.eslintrc.json index deac56c2..07c7f73a 100644 --- a/@types/ansicolor/.eslintrc.json +++ b/@types/ansicolor/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.d.ts", - "src/**/*.d.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.d.ts", "src/**/*.d.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/@types/rollup-plugin-polyfill-node/.eslintrc.json b/@types/rollup-plugin-polyfill-node/.eslintrc.json index 9c98e0bc..069f98c4 100644 --- a/@types/rollup-plugin-polyfill-node/.eslintrc.json +++ b/@types/rollup-plugin-polyfill-node/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.d.ts", - "src/**/*.d.ts" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.d.ts", "src/**/*.d.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/@types/shell-escape-tag/.eslintrc.json b/@types/shell-escape-tag/.eslintrc.json index 9c98e0bc..069f98c4 100644 --- a/@types/shell-escape-tag/.eslintrc.json +++ b/@types/shell-escape-tag/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.d.ts", - "src/**/*.d.ts" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.d.ts", "src/**/*.d.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/@types/shell-split/.eslintrc.json b/@types/shell-split/.eslintrc.json index 9c98e0bc..069f98c4 100644 --- a/@types/shell-split/.eslintrc.json +++ b/@types/shell-split/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.d.ts", - "src/**/*.d.ts" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.d.ts", "src/**/*.d.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/preact-hello-world/.eslintrc.json b/demos/preact-hello-world/.eslintrc.json index 7cc87a14..dde8a506 100644 --- a/demos/preact-hello-world/.eslintrc.json +++ b/demos/preact-hello-world/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/preact/.eslintrc.json b/demos/preact/.eslintrc.json index 7cc87a14..dde8a506 100644 --- a/demos/preact/.eslintrc.json +++ b/demos/preact/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react-jsnation-workshop/.eslintrc.json b/demos/react-jsnation-workshop/.eslintrc.json index c8f1e985..9fb0c333 100644 --- a/demos/react-jsnation-workshop/.eslintrc.json +++ b/demos/react-jsnation-workshop/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/demos" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/demos"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react-jsnation/.eslintrc.json b/demos/react-jsnation/.eslintrc.json index c8f1e985..9fb0c333 100644 --- a/demos/react-jsnation/.eslintrc.json +++ b/demos/react-jsnation/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/demos" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/demos"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react-jsnation/tests/.eslintrc.json b/demos/react-jsnation/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/demos/react-jsnation/tests/.eslintrc.json +++ b/demos/react-jsnation/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react-lite-query/.eslintrc.json b/demos/react-lite-query/.eslintrc.json index c8f1e985..9fb0c333 100644 --- a/demos/react-lite-query/.eslintrc.json +++ b/demos/react-lite-query/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/demos" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/demos"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react-query/.eslintrc.json b/demos/react-query/.eslintrc.json index 7cc87a14..dde8a506 100644 --- a/demos/react-query/.eslintrc.json +++ b/demos/react-query/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react-stock-ticker/.eslintrc.json b/demos/react-stock-ticker/.eslintrc.json index c8f1e985..9fb0c333 100644 --- a/demos/react-stock-ticker/.eslintrc.json +++ b/demos/react-stock-ticker/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/demos" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/demos"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react-store/.eslintrc.json b/demos/react-store/.eslintrc.json index c8f1e985..9fb0c333 100644 --- a/demos/react-store/.eslintrc.json +++ b/demos/react-store/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/demos" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/demos"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/demos/react/.eslintrc.json b/demos/react/.eslintrc.json index 7cc87a14..dde8a506 100644 --- a/demos/react/.eslintrc.json +++ b/demos/react/.eslintrc.json @@ -1,45 +1,25 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "vite.config.ts" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["vite.config.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/preact/preact-testing-utils/.eslintrc.json b/packages/preact/preact-testing-utils/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/preact/preact-testing-utils/.eslintrc.json +++ b/packages/preact/preact-testing-utils/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/preact/preact-testing-utils/tests/.eslintrc.json b/packages/preact/preact-testing-utils/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/preact/preact-testing-utils/tests/.eslintrc.json +++ b/packages/preact/preact-testing-utils/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/preact/preact-utils/.eslintrc.json b/packages/preact/preact-utils/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/preact/preact-utils/.eslintrc.json +++ b/packages/preact/preact-utils/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/preact/preact-utils/tests/.eslintrc.json b/packages/preact/preact-utils/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/preact/preact-utils/tests/.eslintrc.json +++ b/packages/preact/preact-utils/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/preact/preact/.eslintrc.json b/packages/preact/preact/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/preact/preact/.eslintrc.json +++ b/packages/preact/preact/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/preact/preact/tests/.eslintrc.json b/packages/preact/preact/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/preact/preact/tests/.eslintrc.json +++ b/packages/preact/preact/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/react/react/.eslintrc.json b/packages/react/react/.eslintrc.json index aff01754..953bbc38 100644 --- a/packages/react/react/.eslintrc.json +++ b/packages/react/react/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/react/react/tests/.eslintrc.json b/packages/react/react/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/react/react/tests/.eslintrc.json +++ b/packages/react/react/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/react/test-utils/.eslintrc.json b/packages/react/test-utils/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/react/test-utils/.eslintrc.json +++ b/packages/react/test-utils/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/react/use-strict-lifecycle/.eslintrc.json b/packages/react/use-strict-lifecycle/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/react/use-strict-lifecycle/.eslintrc.json +++ b/packages/react/use-strict-lifecycle/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/react/use-strict-lifecycle/tests/.eslintrc.json b/packages/react/use-strict-lifecycle/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/react/use-strict-lifecycle/tests/.eslintrc.json +++ b/packages/react/use-strict-lifecycle/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/collections/.eslintrc.json b/packages/universal/collections/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/collections/.eslintrc.json +++ b/packages/universal/collections/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/collections/tests/.eslintrc.json b/packages/universal/collections/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/collections/tests/.eslintrc.json +++ b/packages/universal/collections/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/core-utils/.eslintrc.json b/packages/universal/core-utils/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/core-utils/.eslintrc.json +++ b/packages/universal/core-utils/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/core-utils/tests/.eslintrc.json b/packages/universal/core-utils/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/core-utils/tests/.eslintrc.json +++ b/packages/universal/core-utils/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/core/.eslintrc.json b/packages/universal/core/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/core/.eslintrc.json +++ b/packages/universal/core/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/debug/.eslintrc.json b/packages/universal/debug/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/debug/.eslintrc.json +++ b/packages/universal/debug/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/debug/tests/.eslintrc.json b/packages/universal/debug/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/debug/tests/.eslintrc.json +++ b/packages/universal/debug/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/interfaces/.eslintrc.json b/packages/universal/interfaces/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/interfaces/.eslintrc.json +++ b/packages/universal/interfaces/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/modifier/.eslintrc.json b/packages/universal/modifier/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/modifier/.eslintrc.json +++ b/packages/universal/modifier/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/reactive/.eslintrc.json b/packages/universal/reactive/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/reactive/.eslintrc.json +++ b/packages/universal/reactive/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/reactive/tests/.eslintrc.json b/packages/universal/reactive/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/reactive/tests/.eslintrc.json +++ b/packages/universal/reactive/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/renderer/.eslintrc.json b/packages/universal/renderer/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/renderer/.eslintrc.json +++ b/packages/universal/renderer/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/renderer/tests/.eslintrc.json b/packages/universal/renderer/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/renderer/tests/.eslintrc.json +++ b/packages/universal/renderer/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/resource/.eslintrc.json b/packages/universal/resource/.eslintrc.json index e8f35ae3..76aa0b80 100644 --- a/packages/universal/resource/.eslintrc.json +++ b/packages/universal/resource/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/resource/tests/.eslintrc.json b/packages/universal/resource/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/resource/tests/.eslintrc.json +++ b/packages/universal/resource/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/runtime/.eslintrc.json b/packages/universal/runtime/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/runtime/.eslintrc.json +++ b/packages/universal/runtime/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/runtime/tests/.eslintrc.json b/packages/universal/runtime/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/runtime/tests/.eslintrc.json +++ b/packages/universal/runtime/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/service/.eslintrc.json b/packages/universal/service/.eslintrc.json index e8f35ae3..76aa0b80 100644 --- a/packages/universal/service/.eslintrc.json +++ b/packages/universal/service/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/service/tests/.eslintrc.json b/packages/universal/service/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/service/tests/.eslintrc.json +++ b/packages/universal/service/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/shared/.eslintrc.json b/packages/universal/shared/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/shared/.eslintrc.json +++ b/packages/universal/shared/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/shared/tests/.eslintrc.json b/packages/universal/shared/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/shared/tests/.eslintrc.json +++ b/packages/universal/shared/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/tags/.eslintrc.json b/packages/universal/tags/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/tags/.eslintrc.json +++ b/packages/universal/tags/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/universal/.eslintrc.json b/packages/universal/universal/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/universal/.eslintrc.json +++ b/packages/universal/universal/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/universal/tests/.eslintrc.json b/packages/universal/universal/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/universal/tests/.eslintrc.json +++ b/packages/universal/universal/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/verify/.eslintrc.json b/packages/universal/verify/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/universal/verify/.eslintrc.json +++ b/packages/universal/verify/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/universal/verify/tests/.eslintrc.json b/packages/universal/verify/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/universal/verify/tests/.eslintrc.json +++ b/packages/universal/verify/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/vue/vue-testing-utils/.eslintrc.json b/packages/vue/vue-testing-utils/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/vue/vue-testing-utils/.eslintrc.json +++ b/packages/vue/vue-testing-utils/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/vue/vue-testing-utils/tests/.eslintrc.json b/packages/vue/vue-testing-utils/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/vue/vue-testing-utils/tests/.eslintrc.json +++ b/packages/vue/vue-testing-utils/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/vue/vue/.eslintrc.json b/packages/vue/vue/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/vue/vue/.eslintrc.json +++ b/packages/vue/vue/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/vue/vue/tests/.eslintrc.json b/packages/vue/vue/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/vue/vue/tests/.eslintrc.json +++ b/packages/vue/vue/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/x/devtool/.eslintrc.json b/packages/x/devtool/.eslintrc.json index aff01754..953bbc38 100644 --- a/packages/x/devtool/.eslintrc.json +++ b/packages/x/devtool/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.{tsx,ts}", - "src/**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/x/headless-form/.eslintrc.json b/packages/x/headless-form/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/x/headless-form/.eslintrc.json +++ b/packages/x/headless-form/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/x/store/.eslintrc.json b/packages/x/store/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/x/store/.eslintrc.json +++ b/packages/x/store/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/x/store/tests/.eslintrc.json b/packages/x/store/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/x/store/tests/.eslintrc.json +++ b/packages/x/store/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/x/vanilla/.eslintrc.json b/packages/x/vanilla/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/packages/x/vanilla/.eslintrc.json +++ b/packages/x/vanilla/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/packages/x/vanilla/tests/.eslintrc.json b/packages/x/vanilla/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/packages/x/vanilla/tests/.eslintrc.json +++ b/packages/x/vanilla/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a4f08b83..3cb88682 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2234,18 +2234,9 @@ importers: '@starbeam-workspace/json': specifier: workspace:^ version: link:../json - '@starbeam-workspace/paths': - specifier: workspace:^ - version: link:../paths '@starbeam-workspace/shared': specifier: workspace:^ version: link:../shared - '@starbeam/core-utils': - specifier: workspace:^ - version: link:../../packages/universal/core-utils - '@starbeam/verify': - specifier: workspace:^ - version: link:../../packages/universal/verify chalk: specifier: ^5.3.0 version: 5.3.0 @@ -2408,9 +2399,12 @@ importers: '@starbeam-workspace/json': specifier: workspace:* version: link:../json - shell-escape-tag: - specifier: ^2.0.2 - version: 2.0.2 + '@starbeam/core-utils': + specifier: workspace:^ + version: link:../../packages/universal/core-utils + fast-glob: + specifier: ^3.3.1 + version: 3.3.1 devDependencies: '@starbeam-dev/build-support': specifier: workspace:^ @@ -2418,9 +2412,19 @@ importers: '@starbeam/eslint-plugin': specifier: workspace:^ version: link:../eslint - '@types/shell-escape-tag': + + workspace/paths/tests: + dependencies: + '@starbeam-workspace/paths': specifier: workspace:^ - version: link:../../@types/shell-escape-tag + version: link:.. + devDependencies: + '@starbeam-workspace/test-utils': + specifier: workspace:^ + version: link:../../test-utils + '@starbeam/eslint-plugin': + specifier: workspace:^ + version: link:../../eslint workspace/reporter: dependencies: diff --git a/workspace/@domtree/any/.eslintrc.json b/workspace/@domtree/any/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/@domtree/any/.eslintrc.json +++ b/workspace/@domtree/any/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/@domtree/browser/.eslintrc.json b/workspace/@domtree/browser/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/@domtree/browser/.eslintrc.json +++ b/workspace/@domtree/browser/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/@domtree/flavors/.eslintrc.json b/workspace/@domtree/flavors/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/@domtree/flavors/.eslintrc.json +++ b/workspace/@domtree/flavors/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/@domtree/interface/.eslintrc.json b/workspace/@domtree/interface/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/@domtree/interface/.eslintrc.json +++ b/workspace/@domtree/interface/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/@domtree/minimal/.eslintrc.json b/workspace/@domtree/minimal/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/@domtree/minimal/.eslintrc.json +++ b/workspace/@domtree/minimal/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/build/.eslintrc.json b/workspace/build/.eslintrc.json index a4168766..3af7d978 100644 --- a/workspace/build/.eslintrc.json +++ b/workspace/build/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/esm" - ], - "files": [ - "index.{js,d.ts}", - "src/**/*.{js,d.ts}" - ], + "extends": ["plugin:@starbeam/esm"], + "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/edit-json/.eslintrc.json b/workspace/edit-json/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/edit-json/.eslintrc.json +++ b/workspace/edit-json/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/edit-json/index.ts b/workspace/edit-json/index.ts index 67cfad65..d1a0df8f 100644 --- a/workspace/edit-json/index.ts +++ b/workspace/edit-json/index.ts @@ -12,6 +12,9 @@ export { getRange, getValueAt as getValue, } from "./src/representation/nodes/abstract.js"; +export type { JsonArrayNode } from "./src/representation/nodes/array.js"; +export type { JsonObjectNode } from "./src/representation/nodes/object.js"; +export type { JsonPrimitiveNode } from "./src/representation/nodes/primitive.js"; export { type ModifiableSourceRoot, SourceCursor, diff --git a/workspace/edit-json/package.json b/workspace/edit-json/package.json index 18fc37af..275b9ec0 100644 --- a/workspace/edit-json/package.json +++ b/workspace/edit-json/package.json @@ -27,10 +27,7 @@ "test:types": "tsc -b" }, "dependencies": { - "@starbeam/core-utils": "workspace:^", - "@starbeam/verify": "workspace:^", "@starbeam-workspace/json": "workspace:^", - "@starbeam-workspace/paths": "workspace:^", "@starbeam-workspace/shared": "workspace:^", "chalk": "^5.3.0", "codespan-wasm": "^0.4.0", diff --git a/workspace/edit-json/src/diagnostics.ts b/workspace/edit-json/src/diagnostics.ts index e2f2131d..2219cc34 100644 --- a/workspace/edit-json/src/diagnostics.ts +++ b/workspace/edit-json/src/diagnostics.ts @@ -103,12 +103,6 @@ export interface EmittableDiagnostic { color: codespan.ColorSpec | codespan.Color; } -export function intoColorSpec( - spec: codespan.Color | IntoColor, -): codespan.ColorSpec { - return typeof spec === "string" ? Color({ fgColor: spec }) : Color(spec); -} - export function isCollapsed(label: codespan.Label): boolean { return label.rangeStart === label.rangeEnd; } diff --git a/workspace/edit-json/src/edits/edits.ts b/workspace/edit-json/src/edits/edits.ts index d6382344..7f179dba 100644 --- a/workspace/edit-json/src/edits/edits.ts +++ b/workspace/edit-json/src/edits/edits.ts @@ -184,33 +184,3 @@ export function Color(options: IntoColor): codespan.ColorSpec { }; } } - -export function PrimaryColor( - colorSpec: codespan.ColorSpec | codespan.Color, -): codespan.Styles { - const color = - typeof colorSpec === "string" - ? Color({ - fgColor: colorSpec, - }) - : colorSpec; - - return { - headerNote: { - ...color, - dimmed: true, - }, - - headerMessage: { - ...color, - reset: true, - }, - - primaryLabelNote: color, - secondaryLabel: color, - - sourceBorder: Color({ fgColor: "cyan" }), - lineNumber: Color({ fgColor: "cyan" }), - noteBullet: Color({ fgColor: "cyan" }), - }; -} diff --git a/workspace/edit-json/src/jsonc/representation/node.ts b/workspace/edit-json/src/jsonc/representation/node.ts index 6efc64c6..1f0add5f 100644 --- a/workspace/edit-json/src/jsonc/representation/node.ts +++ b/workspace/edit-json/src/jsonc/representation/node.ts @@ -1,20 +1,5 @@ import type * as jsonc from "jsonc-parser"; -import type { JsonValueNode } from "../../representation/node.js"; -import type { SourceRange } from "../../representation/source.js"; - export type JsoncValueNode = jsonc.Node & { type: Exclude; }; - -export interface ValuedJsonNodeFields { - value?: unknown; - children?: JsonValueNode[] | Record; - colonOffset?: number; -} - -export interface EntryJsonNodeFields { - range: SourceRange; - key: string; - value: JsonValueNode; -} diff --git a/workspace/edit-json/src/representation/node.ts b/workspace/edit-json/src/representation/node.ts index 1581661b..76befb0e 100644 --- a/workspace/edit-json/src/representation/node.ts +++ b/workspace/edit-json/src/representation/node.ts @@ -12,12 +12,6 @@ export type JsoncValueNode = jsonc.Node & { type: Exclude; }; -export interface ValuedJsonNodeFields { - value?: unknown; - children?: JsonValueNode[] | Record; - colonOffset?: number; -} - export interface EntryJsonNodeFields { range: SourceRange; key: string; diff --git a/workspace/edit-json/src/representation/nodes/convert.ts b/workspace/edit-json/src/representation/nodes/convert.ts index d529f7ee..ed784708 100644 --- a/workspace/edit-json/src/representation/nodes/convert.ts +++ b/workspace/edit-json/src/representation/nodes/convert.ts @@ -45,11 +45,3 @@ export function intoValueNode( return new JsonObjectNode(source, node as RawJsonObject, path); } } - -export function isValueNode(node: jsonc.Node): node is JsoncValueNode { - return node.type !== "property"; -} - -export function isArrayNode(node: jsonc.Node): node is JsoncValueNode { - return node.type === "array"; -} diff --git a/workspace/edit-json/src/representation/nodes/utils.ts b/workspace/edit-json/src/representation/nodes/utils.ts index d2cc97cc..62e8ea02 100644 --- a/workspace/edit-json/src/representation/nodes/utils.ts +++ b/workspace/edit-json/src/representation/nodes/utils.ts @@ -1,10 +1,6 @@ import type * as jsonc from "jsonc-parser"; -import type { JsoncValueNode, JsonValueNode } from "../node.js"; -import type { RawJsonEntry } from "../raw.js"; -import type { SourceRoot } from "../source.js"; -import { intoValueNode } from "./convert.js"; -import { JsonEntryNode } from "./object.js"; +import type { JsoncValueNode } from "../node.js"; export function assertValueNode( node: jsonc.Node, @@ -28,15 +24,3 @@ export function isArrayNode(node: jsonc.Node): node is JsoncValueNode { export function isObjectNode(node: jsonc.Node): node is JsoncValueNode { return node.type === "object"; } - -export function intoJsonNode( - source: SourceRoot, - node: jsonc.Node, - path: jsonc.JSONPath, -): JsonValueNode | JsonEntryNode { - if (node.type === "property") { - return new JsonEntryNode(source, node as RawJsonEntry, path); - } else { - return intoValueNode(source, node as JsoncValueNode, path); - } -} diff --git a/workspace/edit-json/src/stringify.ts b/workspace/edit-json/src/stringify.ts index 0a89a9b3..b9c5c23d 100644 --- a/workspace/edit-json/src/stringify.ts +++ b/workspace/edit-json/src/stringify.ts @@ -47,32 +47,36 @@ if (import.meta.vitest) { describe("stringify", () => { test("string", () => { - expect(stringify("foo")).toEqual('"foo"'); + expect(stringify("foo")).toEqual(chalk.cyan('"foo"')); }); test("number", () => { // eslint-disable-next-line @typescript-eslint/no-magic-numbers - expect(stringify(1)).toEqual("1"); + expect(stringify(1)).toEqual(chalk.cyan("1")); }); test("boolean", () => { - expect(stringify(true)).toEqual("true"); - expect(stringify(false)).toEqual("false"); + expect(stringify(true)).toEqual(chalk.cyan("true")); + expect(stringify(false)).toEqual(chalk.cyan("false")); }); test("null", () => { - expect(stringify(null)).toEqual("null"); + expect(stringify(null)).toEqual(chalk.cyan("null")); }); test("array", () => { // eslint-disable-next-line @typescript-eslint/no-magic-numbers - expect(stringify([1, 2, 3])).toEqual("[ 1, 2, 3 ]"); + expect(stringify([1, 2, 3])).toEqual( + `[ ${chalk.cyan(1)}, ${chalk.cyan(2)}, ${chalk.cyan(3)} ]`, + ); }); test("object", () => { - expect(stringify({ one: "1" })).toEqual(`{ "one": "1" }`); + expect(stringify({ one: "1" })).toEqual( + `{ "one": ${chalk.cyan('"1"')} }`, + ); expect(stringify({ one: "1", two: "2" })).toEqual( - `{ "one": "1", "two": "2" }`, + `{ "one": ${chalk.cyan('"1"')}, "two": ${chalk.cyan('"2"')} }`, ); }); }); diff --git a/workspace/edit-json/tests/.eslintrc.json b/workspace/edit-json/tests/.eslintrc.json index 9b58b6e4..b0b22424 100644 --- a/workspace/edit-json/tests/.eslintrc.json +++ b/workspace/edit-json/tests/.eslintrc.json @@ -1,33 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/loose" - ], - "files": [ - "**/*.{tsx,ts}" - ], + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/eslint/.eslintrc.json b/workspace/eslint/.eslintrc.json index fb4580d5..074e100c 100644 --- a/workspace/eslint/.eslintrc.json +++ b/workspace/eslint/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/commonjs" - ], - "files": [ - "index.{js,d.ts}", - "src/**/*.{js,d.ts}" - ], + "extends": ["plugin:@starbeam/commonjs"], + "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/json/.eslintrc.json b/workspace/json/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/json/.eslintrc.json +++ b/workspace/json/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/misc/.eslintrc.json b/workspace/misc/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/misc/.eslintrc.json +++ b/workspace/misc/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/package/.eslintrc.json b/workspace/package/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/package/.eslintrc.json +++ b/workspace/package/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/paths/.eslintrc.json b/workspace/paths/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/paths/.eslintrc.json +++ b/workspace/paths/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/paths/index.ts b/workspace/paths/index.ts index d2133a24..a0ecb446 100644 --- a/workspace/paths/index.ts +++ b/workspace/paths/index.ts @@ -2,7 +2,6 @@ export type { AsDirectory, AsRegularFile, GlobAllow, - GlobMatch, GlobOptions, Path, } from "./src/paths.js"; @@ -11,10 +10,9 @@ export { DiskFile, Glob, Globs, - join, - parts, Paths, RegularFile, - resolve, UnknownFile, } from "./src/paths.js"; +export type { GlobMatch } from "./src/utils.js"; +export { join, parts, resolve } from "./src/utils.js"; diff --git a/workspace/paths/package.json b/workspace/paths/package.json index 4f2a4f30..fb11e601 100644 --- a/workspace/paths/package.json +++ b/workspace/paths/package.json @@ -23,15 +23,16 @@ }, "scripts": { "test:lint": "eslint . --max-warnings 0", + "test:specs": "vitest --run", "test:types": "tsc -b" }, "dependencies": { + "@starbeam/core-utils": "workspace:^", "@starbeam-workspace/json": "workspace:*", - "shell-escape-tag": "^2.0.2" + "fast-glob": "^3.3.1" }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^", - "@starbeam-dev/build-support": "workspace:^", - "@types/shell-escape-tag": "workspace:^" + "@starbeam-dev/build-support": "workspace:^" } } diff --git a/workspace/paths/src/paths.ts b/workspace/paths/src/paths.ts index 3de61119..86702823 100644 --- a/workspace/paths/src/paths.ts +++ b/workspace/paths/src/paths.ts @@ -1,13 +1,7 @@ import type { Dirent } from "node:fs"; import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs"; import { readFile, unlink, writeFile } from "node:fs/promises"; -import { - basename, - dirname, - isAbsolute, - relative, - resolve as nodeResolve, -} from "node:path"; +import { basename, dirname, isAbsolute, relative } from "node:path"; import { pathToFileURL } from "node:url"; import { @@ -20,7 +14,9 @@ import { TO_STRING, } from "@starbeam/core-utils"; import type { JsonObject } from "@starbeam-workspace/json"; -import glob, { type Entry, type Options } from "fast-glob"; +import glob, { type Entry } from "fast-glob"; + +import { type GlobMatch, includeOptions, resolve } from "./utils.js"; export class Paths { static workspaceRoot(root: string): Paths { @@ -410,28 +406,8 @@ export type GlobFormat = | "relative:quoted" | ((input: Glob) => string); -export type GlobMatch = "files" | "directories"; export type GlobAllow = "symlink"; -function includeOptions(include?: GlobMatch[]): Options { - if (include === undefined) { - return { onlyDirectories: false, onlyFiles: false }; - } - - const options: Options = {}; - - if (include.includes("files") && include.includes("directories")) { - options.onlyDirectories = false; - options.onlyFiles = false; - } else if (include.includes("files")) { - options.onlyFiles = true; - } else if (include.includes("directories")) { - options.onlyDirectories = true; - } - - return options; -} - export class Glob extends Path { static create( root: string, @@ -742,24 +718,6 @@ class Packages extends Directory { } } -/** - * Convert a path separated with `/` (the API for this package) to a list of path segments. - * - * This means that `\` will be treated as a normal character (even on Windows), which means that - * this API doesn't support verbatim paths (paths starting with `\\?\`). - */ -export function parts(path: string): string[] { - return path.split("/"); -} - -export function join(...parts: string[]): string { - return parts.join("/"); -} - -export function resolve(root: string, path: string): string { - return nodeResolve(root, ...parts(path)); -} - type DirEntry = Pick< Dirent, | "isBlockDevice" diff --git a/workspace/paths/src/utils.ts b/workspace/paths/src/utils.ts new file mode 100644 index 00000000..0de25848 --- /dev/null +++ b/workspace/paths/src/utils.ts @@ -0,0 +1,161 @@ +import { isAbsolute, resolve as nodeResolve } from "node:path"; + +import type { Options as FastGlobOptions } from "fast-glob"; + +export type GlobMatch = "files" | "directories"; + +export function includeOptions(include?: GlobMatch[]): FastGlobOptions { + if (include === undefined) { + return { onlyDirectories: false, onlyFiles: false }; + } + + const options: FastGlobOptions = {}; + + if (include.includes("files") && include.includes("directories")) { + options.onlyDirectories = false; + options.onlyFiles = false; + } else if (include.includes("files")) { + options.onlyFiles = true; + } else if (include.includes("directories")) { + options.onlyDirectories = true; + } + + return options; +} + +/** + * Convert a path separated with `/` (the API for this package) to a list of path segments. + * + * This means that `\` will be treated as a normal character (even on Windows), which means that + * this API doesn't support verbatim paths (paths starting with `\\?\`). + * + * This API removes leading `/`s, trailing `/`s and condenses multiple `/`s into a single `/`. + */ +export function parts(path: string): string[] { + return path.replace(/(^\/*|\/*$)/g, "").split(/\/+/); +} + +export function join(...parts: string[]): string { + return parts.join("/"); +} + +/** + * Resolve and normalize a path relative to a root. + * + * If the root is absolute, then resolve the path relative to the root, + * normalizing the resulting path in the same manner as `node:path.resolve`. + * + * If the root is relative, then join the path relative to the root, normalizing + * the resulting path in the same manner as `node:path.join`. + * + * This basically means that multiple consecutive `/`s in the path will be condensed + * into a single `/`, and that the root and path will be joined with a single + * `/`, regardless of whether the root ends with a trailing `/` or the path + * begins with a leading `/`. + */ +export function resolve(root: string, path: string): string { + if (isAbsolute(root)) { + path = path.replace(/^\/?/, ""); + return nodeResolve(root, ...parts(path)); + } else { + return join(...parts(root), ...parts(path)); + } +} + +if (import.meta.vitest) { + const { describe, test, expect } = import.meta.vitest; + + describe("parts", () => { + test("with a leading /", () => { + expect(parts("/a/b/c")).toEqual(["a", "b", "c"]); + }); + + test("with a trailing /", () => { + expect(parts("/a/b/c/")).toEqual(["a", "b", "c"]); + }); + + test("with multiple '/'s", () => { + expect(parts("/a/b//c")).toEqual(["a", "b", "c"]); + }); + }); + + describe("baseline node resolve assumptions", () => { + test("with a leading / as the root", () => { + expect(nodeResolve("/", "a", "b", "c")).toBe("/a/b/c"); + }); + }); + + describe("resolve", () => { + describe("absolute root", () => { + test("with a leading / in the path", () => { + expect(resolve("/", "/a/b/c")).toEqual("/a/b/c"); + }); + + test("with a trailing / in the root and a leading / in the path", () => { + expect(resolve("/a/b/", "/c")).toEqual("/a/b/c"); + }); + + test("with a trailing / in the root and no leading / in the path", () => { + expect(resolve("/a/b/", "c/d/")).toEqual("/a/b/c/d"); + }); + + test("with a trailing / in the path", () => { + expect(resolve("/a/b", "/c/d/")).toEqual("/a/b/c/d"); + }); + + test("with multiple '/'s next to each other in the root", () => { + expect(resolve("/a/b//c", "/d/e/f")).toEqual("/a/b/c/d/e/f"); + }); + + test("with multiple '/'s next to each other in the path", () => { + expect(resolve("/a/b", "/c/d//e/f")).toEqual("/a/b/c/d/e/f"); + }); + + test("with multiple superfluous slashes in the path", () => { + expect(resolve("/a//b/", "/c//d/e/f/")).toEqual("/a/b/c/d/e/f"); + }); + + test("with superflous slashes at the beginning of the root", () => { + expect(resolve("//a/b", "/c/d/e/f")).toEqual("/a/b/c/d/e/f"); + }); + + test("with superflous slashes at the beginning of the path", () => { + expect(resolve("/a/b", "//c/d/e/f")).toEqual("/a/b/c/d/e/f"); + }); + }); + + describe("relative root", () => { + test("without a leading / in the root and a leading / in the path", () => { + expect(resolve("a/b", "/c/d")).toEqual("a/b/c/d"); + }); + + test("with a trailing / in the root and a leading / in the path", () => { + expect(resolve("a/b/", "/c")).toEqual("a/b/c"); + }); + + test("with a trailing / in the root and no leading / in the path", () => { + expect(resolve("a/b/", "c/d/")).toEqual("a/b/c/d"); + }); + + test("with a trailing / in the path", () => { + expect(resolve("a/b", "/c/d/")).toEqual("a/b/c/d"); + }); + + test("with multiple '/'s next to each other in the root", () => { + expect(resolve("a/b//c", "/d/e/f")).toEqual("a/b/c/d/e/f"); + }); + + test("with multiple '/'s next to each other in the path", () => { + expect(resolve("a/b", "/c/d//e/f")).toEqual("a/b/c/d/e/f"); + }); + + test("with multiple superfluous slashes in the path", () => { + expect(resolve("a//b/", "/c//d/e/f/")).toEqual("a/b/c/d/e/f"); + }); + + test("with superflous slashes at the beginning of the path", () => { + expect(resolve("a/b", "//c/d/e/f")).toEqual("a/b/c/d/e/f"); + }); + }); + }); +} diff --git a/workspace/paths/tests/.eslintrc.json b/workspace/paths/tests/.eslintrc.json new file mode 100644 index 00000000..b0b22424 --- /dev/null +++ b/workspace/paths/tests/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "root": true, + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], + "overrides": [ + { + "extends": ["plugin:@starbeam/loose"], + "files": ["**/*.{tsx,ts}"], + "parserOptions": { + "project": "tsconfig.json" + } + }, + { + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] + } + ] +} diff --git a/workspace/paths/tests/.npmrc b/workspace/paths/tests/.npmrc new file mode 100644 index 00000000..aed5b2b6 --- /dev/null +++ b/workspace/paths/tests/.npmrc @@ -0,0 +1,2 @@ +auto-install-peers=true +strict-peer-dependencies=true diff --git a/workspace/paths/tests/CHANGELOG.md b/workspace/paths/tests/CHANGELOG.md new file mode 100644 index 00000000..8ff5d6d3 --- /dev/null +++ b/workspace/paths/tests/CHANGELOG.md @@ -0,0 +1,7 @@ +# @starbeam-tests/core-utils + +### Patch Changes + +- Updated dependencies [2a957e5] +- Updated dependencies [e03c2a0] + - @starbeam/core-utils@0.5.1 diff --git a/workspace/paths/tests/directory.spec.ts b/workspace/paths/tests/directory.spec.ts new file mode 100644 index 00000000..3a25351a --- /dev/null +++ b/workspace/paths/tests/directory.spec.ts @@ -0,0 +1,5 @@ +import { describe, test } from "@starbeam-workspace/test-utils"; + +describe("relative paths", () => { + test("from a parent directory", () => {}); +}); diff --git a/workspace/paths/tests/package.json b/workspace/paths/tests/package.json new file mode 100644 index 00000000..02eccce6 --- /dev/null +++ b/workspace/paths/tests/package.json @@ -0,0 +1,21 @@ +{ + "private": true, + "name": "@starbeam-workspace-tests/paths", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, + "dependencies": { + "@starbeam-workspace/paths": "workspace:^" + }, + "devDependencies": { + "@starbeam/eslint-plugin": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" + } +} diff --git a/workspace/paths/tests/tsconfig.json b/workspace/paths/tests/tsconfig.json new file mode 100644 index 00000000..a9c31962 --- /dev/null +++ b/workspace/paths/tests/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../../.config/tsconfig/tsconfig.shared.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", + "outDir": "../../../dist/packages" + }, + "exclude": ["dist/**/*"] +} diff --git a/workspace/reporter/.eslintrc.json b/workspace/reporter/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/reporter/.eslintrc.json +++ b/workspace/reporter/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/schemas/.eslintrc.json b/workspace/schemas/.eslintrc.json index e89de728..c2154e5b 100644 --- a/workspace/schemas/.eslintrc.json +++ b/workspace/schemas/.eslintrc.json @@ -1,35 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/esm" - ], - "files": [ - "index.{js,d.ts}", - "src/**/*.{js,d.ts}", - "bin/**/*.js" - ], + "extends": ["plugin:@starbeam/esm"], + "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}", "bin/**/*.js"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/scripts/.eslintrc.json b/workspace/scripts/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/scripts/.eslintrc.json +++ b/workspace/scripts/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/shared/.eslintrc.json b/workspace/shared/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/shared/.eslintrc.json +++ b/workspace/shared/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/test-utils/.eslintrc.json b/workspace/test-utils/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/test-utils/.eslintrc.json +++ b/workspace/test-utils/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/unstable-release/.eslintrc.json b/workspace/unstable-release/.eslintrc.json index a4168766..3af7d978 100644 --- a/workspace/unstable-release/.eslintrc.json +++ b/workspace/unstable-release/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/esm" - ], - "files": [ - "index.{js,d.ts}", - "src/**/*.{js,d.ts}" - ], + "extends": ["plugin:@starbeam/esm"], + "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/utils/.eslintrc.json b/workspace/utils/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/utils/.eslintrc.json +++ b/workspace/utils/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] } diff --git a/workspace/workspace/.eslintrc.json b/workspace/workspace/.eslintrc.json index 66e1250d..52b97b14 100644 --- a/workspace/workspace/.eslintrc.json +++ b/workspace/workspace/.eslintrc.json @@ -1,34 +1,18 @@ { "root": true, - "ignorePatterns": [ - "node_modules", - "dist", - "html", - "tests" - ], - "plugins": [ - "@starbeam" - ], + "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "plugins": ["@starbeam"], "overrides": [ { - "extends": [ - "plugin:@starbeam/tight" - ], - "files": [ - "index.ts", - "src/**/*.ts" - ], + "extends": ["plugin:@starbeam/tight"], + "files": ["index.ts", "src/**/*.ts"], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": [ - "plugin:@starbeam/json:recommended" - ], - "files": [ - "*.json" - ] + "extends": ["plugin:@starbeam/json:recommended"], + "files": ["*.json"] } ] }