Skip to content

Commit

Permalink
refactor: localize test:types dependencies in packages/store/types
Browse files Browse the repository at this point in the history
  • Loading branch information
arturovt committed Feb 1, 2024
1 parent 1868d9f commit d696704
Show file tree
Hide file tree
Showing 5 changed files with 1,225 additions and 493 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"build:integration:ssr": "yarn build:integration && nx server integration --configuration production",
"// - TESTING": "Test all modules #requires yarn build:packages",
"test:integration": "nx run integration:test --colors --run-in-band",
"test:types": "cd packages/store/types && yarn test:types",
"test:types": "yarn --cwd packages/store/types test:types",
"// - E2E": "E2E testing #requires yarn build:integration",
"cy:open": "cypress open",
"cy:open:ssr": "cross-env SSR=true cypress open",
Expand Down
3 changes: 3 additions & 0 deletions packages/store/types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
We have `@definitelytyped/header-parser` resolved to version `0.0.93` because `dtslint` points to the `latest` version, which is `^0.2.2` and is not compatible with the API being used by `dtslint` (due to its deprecation). In the future, we will need to migrate to `tsd` instead.

We have all of these dependencies installed separately from the root dependencies to avoid conflicts with different TypeScript versions and other dependencies.
8 changes: 6 additions & 2 deletions packages/store/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"name": "store-types",
"version": "0.0.0",
"scripts": {
"test:types": "tsd ./tests/*.d.ts"
"test:types": "dtslint . --localTs node_modules/typescript/lib"
},
"devDependencies": {
"tsd": "^0.30.4"
"dtslint": "^3.6.9",
"typescript": "4.8.4"
},
"resolutions": {
"@definitelytyped/header-parser": "0.0.93"
}
}
41 changes: 41 additions & 0 deletions packages/store/types/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"extends": "dtslint/dtslint.json",
"rules": {
"semicolon": false,
"indent": [false, "tabs"],
"no-useless-files": false,
"eofline": false,
"no-sparse-arrays": false,
"no-unnecessary-class": false,
"strict-comparisons": false,
"prefer-while": false,
"no-construct": false,
"member-access": false,
"no-object-literal-type-assertion": false,
"interface-over-type-literal": false,
"whitespace": [
false,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"radix": false,
"prefer-object-spread": false,
"no-empty-interface": false,
"no-unused-variable": false,
"no-duplicate-variable": false,
"function-constructor": false,
"label-position": false,
"no-eval": false,
"interface-name": false,
"prefer-switch": false,
"no-misused-new": false,
"prefer-const": false,
"one-variable-per-declaration": false,
"no-arg": false,
"object-literal-key-quotes": false,
"no-var-keyword": false
}
}
Loading

0 comments on commit d696704

Please sign in to comment.