eslint-plugin-turbo 2.8.2-canary.1 → 2.8.2-canary.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/flat/recommended.d.ts +13 -0
- package/dist/configs/flat/recommended.d.ts.map +1 -0
- package/dist/configs/recommended.d.ts +13 -0
- package/dist/configs/recommended.d.ts.map +1 -0
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/index.d.ts +15 -39
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82 -208
- package/dist/rules/no-undeclared-env-vars.d.ts +18 -0
- package/dist/rules/no-undeclared-env-vars.d.ts.map +1 -0
- package/dist/utils/calculate-inputs.d.ts +48 -0
- package/dist/utils/calculate-inputs.d.ts.map +1 -0
- package/dist/utils/dotenv-processing.d.ts +7 -0
- package/dist/utils/dotenv-processing.d.ts.map +1 -0
- package/dist/utils/wildcard-processing.d.ts +11 -0
- package/dist/utils/wildcard-processing.d.ts.map +1 -0
- package/package.json +8 -9
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Rule } from "eslint";
|
|
2
|
+
export interface RuleContextWithOptions extends Rule.RuleContext {
|
|
3
|
+
options: Array<{
|
|
4
|
+
cwd?: string;
|
|
5
|
+
allowList?: Array<string>;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
declare function create(context: RuleContextWithOptions): Rule.RuleListener;
|
|
9
|
+
/**
|
|
10
|
+
* Clear all module-level caches. This is primarily useful for test isolation.
|
|
11
|
+
*/
|
|
12
|
+
export declare function clearCache(): void;
|
|
13
|
+
declare const rule: {
|
|
14
|
+
create: typeof create;
|
|
15
|
+
meta: Rule.RuleMetaData;
|
|
16
|
+
};
|
|
17
|
+
export default rule;
|
|
18
|
+
//# sourceMappingURL=no-undeclared-env-vars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-undeclared-env-vars.d.ts","sourceRoot":"","sources":["../../lib/rules/no-undeclared-env-vars.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA6BnC,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,WAAW;IAC9D,OAAO,EAAE,KAAK,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC3B,CAAC,CAAC;CACJ;AAgQD,iBAAS,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC,YAAY,CA8MlE;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAKjC;AAED,QAAA,MAAM,IAAI;;;CAAmB,CAAC;AAC9B,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { WorkspaceConfig } from "@turbo/utils";
|
|
2
|
+
interface EnvironmentConfig {
|
|
3
|
+
legacyConfig: Array<string>;
|
|
4
|
+
env: Array<string>;
|
|
5
|
+
passThroughEnv: Array<string> | null;
|
|
6
|
+
dotEnv: DotEnvConfig | null;
|
|
7
|
+
}
|
|
8
|
+
type EnvVar = string;
|
|
9
|
+
type EnvTest = (variable: EnvVar) => boolean;
|
|
10
|
+
interface EnvironmentTest {
|
|
11
|
+
legacyConfig: EnvTest;
|
|
12
|
+
env: EnvTest;
|
|
13
|
+
passThroughEnv: EnvTest;
|
|
14
|
+
dotEnv: EnvTest;
|
|
15
|
+
}
|
|
16
|
+
interface DotEnvConfig {
|
|
17
|
+
filePaths: Array<string>;
|
|
18
|
+
hashes: Record<string, string | null>;
|
|
19
|
+
}
|
|
20
|
+
export interface ProjectKey {
|
|
21
|
+
global: EnvironmentConfig;
|
|
22
|
+
globalTasks: Record<string, EnvironmentConfig>;
|
|
23
|
+
workspaceTasks: Record<string, Record<string, EnvironmentConfig>>;
|
|
24
|
+
}
|
|
25
|
+
interface ProjectTests {
|
|
26
|
+
global: EnvironmentTest;
|
|
27
|
+
globalTasks: Record<string, EnvironmentTest>;
|
|
28
|
+
workspaceTasks: Record<string, Record<string, EnvironmentTest>>;
|
|
29
|
+
}
|
|
30
|
+
export declare function getWorkspaceFromFilePath(projectWorkspaces: Array<WorkspaceConfig>, filePath: string): WorkspaceConfig | null;
|
|
31
|
+
export declare class Project {
|
|
32
|
+
_key: ProjectKey;
|
|
33
|
+
_test: ProjectTests;
|
|
34
|
+
cwd: string | undefined;
|
|
35
|
+
allConfigs: Array<WorkspaceConfig>;
|
|
36
|
+
projectRoot: WorkspaceConfig | undefined;
|
|
37
|
+
projectWorkspaces: Array<WorkspaceConfig>;
|
|
38
|
+
constructor(cwd: string | undefined);
|
|
39
|
+
valid(): boolean;
|
|
40
|
+
generateKey(): ProjectKey;
|
|
41
|
+
getWorkspacePath(workspaceName: string): string | undefined;
|
|
42
|
+
generateTestConfig(): ProjectTests;
|
|
43
|
+
key(): ProjectKey;
|
|
44
|
+
test(workspaceName: string | undefined, envVar: string): boolean;
|
|
45
|
+
reload(): void;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=calculate-inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculate-inputs.d.ts","sourceRoot":"","sources":["../../lib/utils/calculate-inputs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAOpD,UAAU,iBAAiB;IACzB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B;AAED,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,OAAO,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;A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,MAAM,GAAG,SAAS;IAM3D,kBAAkB,IAAI,YAAY;IAmClC,GAAG;IAIH,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM;IAmBtD,MAAM;CAYP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dotenv-processing.d.ts","sourceRoot":"","sources":["../../lib/utils/dotenv-processing.ts"],"names":[],"mappings":"AAIA,UAAU,YAAY;IACpB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;CACvC;AAED,wBAAgB,MAAM,CACpB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,MAAM,EAAE,YAAY,GACnB,GAAG,CAAC,MAAM,CAAC,CAqBb"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EnvWildcard } from "@turbo/types";
|
|
2
|
+
interface Testable {
|
|
3
|
+
test: (input: string) => boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface WildcardTests {
|
|
6
|
+
inclusions: Testable;
|
|
7
|
+
exclusions: Testable;
|
|
8
|
+
}
|
|
9
|
+
export declare function wildcardTests(wildcardPatterns: Array<EnvWildcard>): WildcardTests;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=wildcard-processing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wildcard-processing.d.ts","sourceRoot":"","sources":["../../lib/utils/wildcard-processing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAsDhD,UAAU,QAAQ;IAChB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CAClC;AAQD,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,QAAQ,CAAC;IACrB,UAAU,EAAE,QAAQ,CAAC;CACtB;AAGD,wBAAgB,aAAa,CAC3B,gBAAgB,EAAE,KAAK,CAAC,WAAW,CAAC,GACnC,aAAa,CAoCf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-turbo",
|
|
3
|
-
"version": "2.8.2-canary.
|
|
3
|
+
"version": "2.8.2-canary.10",
|
|
4
4
|
"description": "ESLint plugin for Turborepo",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"turbo",
|
|
@@ -28,19 +28,18 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@jest/globals": "29.7.0",
|
|
31
|
-
"@types/
|
|
32
|
-
"@types/estree": "1.0.5",
|
|
31
|
+
"@types/estree": "1.0.8",
|
|
33
32
|
"@types/node": "18.17.4",
|
|
34
|
-
"eslint": "
|
|
33
|
+
"eslint": "9.26.0",
|
|
35
34
|
"jest": "29.7.0",
|
|
36
35
|
"json5": "2.2.3",
|
|
37
|
-
"ts-jest": "29.
|
|
38
|
-
"
|
|
36
|
+
"ts-jest": "29.4.6",
|
|
37
|
+
"tsdown": "0.9.3",
|
|
39
38
|
"typescript": "5.5.4",
|
|
39
|
+
"@turbo/test-utils": "0.0.0",
|
|
40
40
|
"@turbo/tsconfig": "0.0.0",
|
|
41
|
-
"@turbo/types": "2.8.2-canary.1",
|
|
42
41
|
"@turbo/utils": "0.0.0",
|
|
43
|
-
"@turbo/
|
|
42
|
+
"@turbo/types": "2.8.2-canary.10"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
45
|
"eslint": ">6.6.0",
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
"license": "MIT",
|
|
50
49
|
"scripts": {
|
|
51
50
|
"test": "jest",
|
|
52
|
-
"build": "
|
|
51
|
+
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
53
52
|
"check-types": "tsc --noEmit",
|
|
54
53
|
"lint:prettier": "prettier -c . --cache --ignore-path=../../.prettierignore"
|
|
55
54
|
}
|