Skip to content

Commit 6c1edb0

Browse files
committed
test(plugin-eslint): integration test for Nx helper with mock monorepo
1 parent 003e0c1 commit 6c1edb0

File tree

22 files changed

+311
-6
lines changed

22 files changed

+311
-6
lines changed

.nxignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# exclude mock Nx monorepos used for testing
2+
mocks
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.nx/cache
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"pluginsConfig": {
3+
"@nrwl/js": {
4+
"analyzeSourceFiles": true
5+
}
6+
}
7+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": ["error"]
22+
}
23+
}
24+
]
25+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "cli",
3+
"sourceRoot": "packages/cli/src",
4+
"projectType": "application",
5+
"targets": {
6+
"lint": {
7+
"executor": "@nx/linter:eslint",
8+
"outputs": ["{options.outputFile}"],
9+
"options": {
10+
"lintFilePatterns": [
11+
"packages/cli/**/*.ts",
12+
"packages/cli/package.json"
13+
]
14+
}
15+
}
16+
}
17+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { exampleCore } from '@example/core';
2+
3+
exampleCore();
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../tsconfig.base.json"
3+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": ["error"]
22+
}
23+
}
24+
]
25+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "core",
3+
"sourceRoot": "packages/core/src",
4+
"projectType": "library",
5+
"targets": {
6+
"lint": {
7+
"executor": "@nx/linter:eslint",
8+
"outputs": ["{options.outputFile}"],
9+
"options": {
10+
"lintFilePatterns": [
11+
"packages/core/**/*.ts",
12+
"packages/core/package.json"
13+
]
14+
}
15+
}
16+
}
17+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { exampleSharedUtil } from '@example/utils';
2+
3+
export function exampleCore() {
4+
exampleSharedUtil();
5+
}

0 commit comments

Comments
 (0)