-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Integration test draft. * CI job. * Format. * Install in the test. * Universal approach for manifest import. * Only use Node for the test.
- Loading branch information
Anna Bocharova
authored
Aug 8, 2024
1 parent
333beb6
commit 6616df4
Showing
5 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ dist | |
.DS_Store | ||
node_modules | ||
coverage | ||
integration-test/yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { readFileSync } from "node:fs"; | ||
import jsPlugin from "@eslint/js"; | ||
import allowedDepsPlugin from "eslint-plugin-allowed-dependencies"; | ||
import tsPlugin from "typescript-eslint"; | ||
|
||
export default [ | ||
{ | ||
plugins: { | ||
allowed: allowedDepsPlugin, | ||
}, | ||
}, | ||
jsPlugin.configs.recommended, | ||
...tsPlugin.configs.recommended, | ||
// For the sources: | ||
{ | ||
files: ["*.ts"], // implies that "src" only contains the sources | ||
rules: { | ||
"allowed/dependencies": [ | ||
"error", | ||
{ | ||
manifest: JSON.parse(readFileSync("package.json", "utf8")), | ||
typeOnly: ["typescript"], | ||
}, | ||
], | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "integration-test", | ||
"private": true, | ||
"version": "0.0.1", | ||
"type": "module", | ||
"devDependencies": { | ||
"eslint": "^9", | ||
"typescript-eslint": "^8", | ||
"typescript": "^5", | ||
"eslint-plugin-allowed-dependencies": "link:.." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { factory } from "typescript"; | ||
|
||
export type Test = typeof factory; |