@sprucelabs/spruce-cli 18.3.1 → 19.0.0

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.d.ts +1 -1
  3. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +20 -39
  4. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
  5. package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
  6. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.d.ts +1 -0
  7. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js +53 -18
  8. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
  9. package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.d.ts +2 -0
  10. package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +75 -30
  11. package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
  12. package/build/__tests__/behavioral/views/WatchingSkillViews.test.js +1 -1
  13. package/build/__tests__/behavioral/views/WatchingSkillViews.test.js.map +1 -1
  14. package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
  15. package/build/__tests__/support/EventFaker.d.ts +1 -1
  16. package/build/__tests__/support/EventFaker.js.map +1 -1
  17. package/build/features/event/EventFeature.d.ts +1 -0
  18. package/build/features/event/EventFeature.js +90 -68
  19. package/build/features/event/EventFeature.js.map +1 -1
  20. package/build/features/eventContract/EventContractFeature.js +1 -4
  21. package/build/features/eventContract/EventContractFeature.js.map +1 -1
  22. package/build/features/eventContract/actions/PullAction.d.ts +1 -0
  23. package/build/features/eventContract/actions/PullAction.js +52 -9
  24. package/build/features/eventContract/actions/PullAction.js.map +1 -1
  25. package/build/features/permission/PermissionFeature.js +19 -9
  26. package/build/features/permission/PermissionFeature.js.map +1 -1
  27. package/build/features/permission/actions/SyncAction.d.ts +22 -3
  28. package/build/features/permission/actions/SyncAction.js +58 -16
  29. package/build/features/permission/actions/SyncAction.js.map +1 -1
  30. package/build/features/permission/stores/PermissionStore.d.ts +6 -2
  31. package/build/features/permission/stores/PermissionStore.js +25 -21
  32. package/build/features/permission/stores/PermissionStore.js.map +1 -1
  33. package/build/features/view/actions/WatchAction.js +1 -1
  34. package/build/features/view/actions/WatchAction.js.map +1 -1
  35. package/node_modules/@typescript-eslint/parser/LICENSE +5 -5
  36. package/node_modules/@typescript-eslint/parser/README.md +6 -300
  37. package/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +1 -1
  38. package/node_modules/@typescript-eslint/parser/dist/parser.js +15 -17
  39. package/node_modules/@typescript-eslint/parser/dist/parser.js.map +1 -1
  40. package/node_modules/@typescript-eslint/parser/package.json +5 -5
  41. package/node_modules/@typescript-eslint/scope-manager/LICENSE +1 -1
  42. package/node_modules/@typescript-eslint/scope-manager/README.md +5 -117
  43. package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
  44. package/node_modules/@typescript-eslint/types/LICENSE +1 -1
  45. package/node_modules/@typescript-eslint/types/README.md +6 -11
  46. package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +0 -6
  47. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +0 -6
  48. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  49. package/node_modules/@typescript-eslint/types/package.json +3 -3
  50. package/node_modules/@typescript-eslint/typescript-estree/LICENSE +5 -5
  51. package/node_modules/@typescript-eslint/typescript-estree/README.md +6 -379
  52. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
  53. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +1 -1
  54. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +3 -3
  55. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
  56. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
  57. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map +1 -0
  58. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.js → getWatchProgramsForProjects.js} +4 -5
  59. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map +1 -0
  60. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +1 -1
  61. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
  62. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +2 -2
  63. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
  64. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +2 -2
  65. package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
  66. package/node_modules/@typescript-eslint/visitor-keys/LICENSE +1 -1
  67. package/node_modules/@typescript-eslint/visitor-keys/README.md +6 -9
  68. package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
  69. package/package.json +27 -27
  70. package/src/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.ts +6 -18
  71. package/src/__tests__/behavioral/permissions/PermissionStore.test.ts +1 -1
  72. package/src/__tests__/behavioral/permissions/SyncingPermissions.test.ts +21 -3
  73. package/src/__tests__/behavioral/upgrading/UpgradingWithListeners.test.ts +13 -0
  74. package/src/__tests__/behavioral/views/WatchingSkillViews.test.ts +1 -1
  75. package/src/__tests__/implementation/ActionExecuter2.test.ts +0 -2
  76. package/src/__tests__/support/EventFaker.ts +1 -2
  77. package/src/features/event/EventFeature.ts +10 -4
  78. package/src/features/eventContract/EventContractFeature.ts +1 -6
  79. package/src/features/eventContract/actions/PullAction.ts +24 -4
  80. package/src/features/permission/PermissionFeature.ts +2 -7
  81. package/src/features/permission/actions/SyncAction.ts +42 -5
  82. package/src/features/permission/stores/PermissionStore.ts +25 -11
  83. package/src/features/view/actions/WatchAction.ts +1 -1
  84. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts.map +0 -1
  85. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js.map +0 -1
@@ -1,304 +1,10 @@
1
- <h1 align="center">TypeScript ESLint Parser</h1>
1
+ # `@typescript-eslint/parser`
2
2
 
3
- <p align="center">An ESLint parser which leverages <a href="https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/typescript-estree">TypeScript ESTree</a> to allow for ESLint to lint TypeScript source code.</p>
3
+ > An ESLint parser which leverages <a href="https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/typescript-estree">TypeScript ESTree</a> to allow for ESLint to lint TypeScript source code.
4
4
 
5
- <p align="center">
6
- <img src="https://github.com/typescript-eslint/typescript-eslint/workflows/CI/badge.svg" alt="CI" />
7
- <a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square" alt="NPM Version" /></a>
8
- <a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square" alt="NPM Downloads" /></a>
9
- </p>
5
+ [![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser)
6
+ [![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser)
10
7
 
11
- ## Getting Started
8
+ 👉 See **https://typescript-eslint.io/architecture/parser** for documentation on this package.
12
9
 
13
- **[You can find our Getting Started docs here](https://typescript-eslint.io/docs)**
14
-
15
- These docs walk you through setting up ESLint, this parser, and our plugin. If you know what you're doing and just want to quick start, read on...
16
-
17
- ## Quick-start
18
-
19
- ### Installation
20
-
21
- ```bash
22
- $ yarn add -D typescript @typescript-eslint/parser
23
- $ npm i --save-dev typescript @typescript-eslint/parser
24
- ```
25
-
26
- ### Usage
27
-
28
- In your ESLint configuration file, set the `parser` property:
29
-
30
- ```json
31
- {
32
- "parser": "@typescript-eslint/parser"
33
- }
34
- ```
35
-
36
- There is sometimes an incorrect assumption that the parser itself is what does everything necessary to facilitate the use of ESLint with TypeScript. In actuality, it is the combination of the parser _and_ one or more plugins which allow you to maximize your usage of ESLint with TypeScript.
37
-
38
- For example, once this parser successfully produces an AST for the TypeScript source code, it might well contain some information which simply does not exist in a standard JavaScript context, such as the data for a TypeScript-specific construct, like an `interface`.
39
-
40
- The core rules built into ESLint, such as `indent` have no knowledge of such constructs, so it is impossible to expect them to work out of the box with them.
41
-
42
- Instead, you also need to make use of one more plugins which will add or extend rules with TypeScript-specific features.
43
-
44
- By far the most common case will be installing the [`@typescript-eslint/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin) plugin, but there are also other relevant options available such a [`@typescript-eslint/eslint-plugin-tslint`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin-tslint).
45
-
46
- ## Configuration
47
-
48
- The following additional configuration options are available by specifying them in [`parserOptions`](https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options) in your ESLint configuration file.
49
-
50
- ```ts
51
- interface ParserOptions {
52
- ecmaFeatures?: {
53
- jsx?: boolean;
54
- globalReturn?: boolean;
55
- };
56
- ecmaVersion?: number | 'latest';
57
-
58
- jsxPragma?: string | null;
59
- jsxFragmentName?: string | null;
60
- lib?: string[];
61
-
62
- project?: string | string[];
63
- projectFolderIgnoreList?: string[];
64
- tsconfigRootDir?: string;
65
- extraFileExtensions?: string[];
66
- warnOnUnsupportedTypeScriptVersion?: boolean;
67
-
68
- program?: import('typescript').Program;
69
- moduleResolver?: string;
70
-
71
- emitDecoratorMetadata?: boolean;
72
- }
73
- ```
74
-
75
- ### `parserOptions.ecmaFeatures.jsx`
76
-
77
- Default `false`.
78
-
79
- Enable parsing JSX when `true`. More details can be found [here](https://www.typescriptlang.org/docs/handbook/jsx.html).
80
-
81
- **NOTE:** this setting does not affect known file types (`.js`, `.mjs`, `.cjs`, `.jsx`, `.ts`, `.mts`, `.cts`, `.tsx`, `.json`) because the TypeScript compiler has its own internal handling for known file extensions.
82
-
83
- <!-- https://github.com/microsoft/TypeScript/blob/d6e483b8dabd8fd37c00954c3f2184bb7f1eb90c/src/compiler/utilities.ts#L6281-L6285 -->
84
-
85
- The exact behavior is as follows:
86
-
87
- - `.js`, `.mjs`, `.cjs`, `.jsx`, `.tsx` files are always parsed as if this is `true`.
88
- - `.ts`, `.mts`, `.cts` files are always parsed as if this is `false`.
89
- - For "unknown" extensions (`.md`, `.vue`):
90
- - If `parserOptions.project` is _not_ provided:
91
- - The setting will be respected.
92
- - If `parserOptions.project` is provided (i.e. you are using rules with type information):
93
- - **always parsed as if this is `false`**
94
-
95
- ### `parserOptions.ecmaFeatures.globalReturn`
96
-
97
- Default `false`.
98
-
99
- This options allows you to tell the parser if you want to allow global `return` statements in your codebase.
100
-
101
- ### `parserOptions.ecmaVersion`
102
-
103
- Default `2018`.
104
-
105
- Accepts any valid ECMAScript version number or `'latest'`:
106
-
107
- - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, ..., or
108
- - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, ..., or
109
- - `'latest'`
110
-
111
- When it's a version or a year, the value **must** be a number - so do not include the `es` prefix.
112
-
113
- Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default
114
-
115
- ### `parserOptions.jsxPragma`
116
-
117
- Default `'React'`
118
-
119
- The identifier that's used for JSX Elements creation (after transpilation).
120
- If you're using a library other than React (like `preact`), then you should change this value. If you are using the [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) you can set this to `null`.
121
-
122
- This should not be a member expression - just the root identifier (i.e. use `"React"` instead of `"React.createElement"`).
123
-
124
- If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
125
-
126
- ### `parserOptions.jsxFragmentName`
127
-
128
- Default `null`
129
-
130
- The identifier that's used for JSX fragment elements (after transpilation).
131
- If `null`, assumes transpilation will always use a member of the configured `jsxPragma`.
132
- This should not be a member expression - just the root identifier (i.e. use `"h"` instead of `"h.Fragment"`).
133
-
134
- If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
135
-
136
- ### `parserOptions.lib`
137
-
138
- Default `['es2018']`
139
-
140
- For valid options, see the [TypeScript compiler options](https://www.typescriptlang.org/tsconfig#lib).
141
-
142
- Specifies the TypeScript `lib`s that are available. This is used by the scope analyser to ensure there are global variables declared for the types exposed by TypeScript.
143
-
144
- If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
145
-
146
- ### `parserOptions.project`
147
-
148
- Default `undefined`.
149
-
150
- This option allows you to provide a path to your project's `tsconfig.json`. **This setting is required if you want to use rules which require type information**. Relative paths are interpreted relative to the current working directory if `tsconfigRootDir` is not set. If you intend on running ESLint from directories other than the project root, you should consider using `tsconfigRootDir`.
151
-
152
- - Accepted values:
153
-
154
- ```js
155
- // path
156
- project: './tsconfig.json';
157
-
158
- // glob pattern
159
- project: './packages/**/tsconfig.json';
160
-
161
- // array of paths and/or glob patterns
162
- project: ['./packages/**/tsconfig.json', './separate-package/tsconfig.json'];
163
- ```
164
-
165
- - If you use project references, TypeScript will not automatically use project references to resolve files. This means that you will have to add each referenced tsconfig to the `project` field either separately, or via a glob.
166
-
167
- - Note that using wide globs `**` in your `parserOptions.project` may cause performance implications. Instead of globs that use `**` to recursively check all folders, prefer paths that use a single `*` at a time. For more info see [#2611](https://github.com/typescript-eslint/typescript-eslint/issues/2611).
168
-
169
- - TypeScript will ignore files with duplicate filenames in the same folder (for example, `src/file.ts` and `src/file.js`). TypeScript purposely ignore all but one of the files, only keeping the one file with the highest priority extension (the extension priority order (from highest to lowest) is `.ts`, `.tsx`, `.d.ts`, `.js`, `.jsx`). For more info see #955.
170
-
171
- - Note that if this setting is specified and `createDefaultProgram` is not, you must only lint files that are included in the projects as defined by the provided `tsconfig.json` files. If your existing configuration does not include all of the files you would like to lint, you can create a separate `tsconfig.eslint.json` as follows:
172
-
173
- ```jsonc
174
- {
175
- // extend your base config so you don't have to redefine your compilerOptions
176
- "extends": "./tsconfig.json",
177
- "include": [
178
- "src/**/*.ts",
179
- "test/**/*.ts",
180
- "typings/**/*.ts",
181
- // etc
182
-
183
- // if you have a mixed JS/TS codebase, don't forget to include your JS files
184
- "src/**/*.js"
185
- ]
186
- }
187
- ```
188
-
189
- ### `parserOptions.tsconfigRootDir`
190
-
191
- Default `undefined`.
192
-
193
- This option allows you to provide the root directory for relative tsconfig paths specified in the `project` option above.
194
-
195
- ### `parserOptions.projectFolderIgnoreList`
196
-
197
- Default `["**/node_modules/**"]`.
198
-
199
- This option allows you to ignore folders from being included in your provided list of `project`s.
200
- This is useful if you have configured glob patterns, but want to make sure you ignore certain folders.
201
-
202
- It accepts an array of globs to exclude from the `project` globs.
203
-
204
- For example, by default it will ensure that a glob like `./**/tsconfig.json` will not match any `tsconfig`s within your `node_modules` folder (some npm packages do not exclude their source files from their published packages).
205
-
206
- ### `parserOptions.extraFileExtensions`
207
-
208
- Default `undefined`.
209
-
210
- This option allows you to provide one or more additional file extensions which should be considered in the TypeScript Program compilation.
211
- The default extensions are `['.js', '.mjs', '.cjs', '.jsx', '.ts', '.mts', '.cts', '.tsx']`.
212
- Add extensions starting with `.`, followed by the file extension. E.g. for a `.vue` file use `"extraFileExtensions": [".vue"]`.
213
-
214
- ### `parserOptions.warnOnUnsupportedTypeScriptVersion`
215
-
216
- Default `true`.
217
-
218
- This option allows you to toggle the warning that the parser will give you if you use a version of TypeScript which is not explicitly supported
219
-
220
- ### `parserOptions.createDefaultProgram`
221
-
222
- Default `false`.
223
-
224
- This option allows you to request that when the `project` setting is specified, files will be allowed when not included in the projects defined by the provided `tsconfig.json` files. **Using this option will incur significant performance costs. This option is primarily included for backwards-compatibility.** See the **`project`** section above for more information.
225
-
226
- ### `parserOptions.programs`
227
-
228
- Default `undefined`.
229
-
230
- This option allows you to programmatically provide an array of one or more instances of a TypeScript Program object that will provide type information to rules.
231
- This will override any programs that would have been computed from `parserOptions.project` or `parserOptions.createDefaultProgram`.
232
- All linted files must be part of the provided program(s).
233
-
234
- ### `parserOptions.moduleResolver`
235
-
236
- Default `undefined`.
237
-
238
- This option allows you to provide a custom module resolution. The value should point to a JS file that default exports (`export default`, or `module.exports =`, or `export =`) a file with the following interface:
239
-
240
- ```ts
241
- interface ModuleResolver {
242
- version: 1;
243
- resolveModuleNames(
244
- moduleNames: string[],
245
- containingFile: string,
246
- reusedNames: string[] | undefined,
247
- redirectedReference: ts.ResolvedProjectReference | undefined,
248
- options: ts.CompilerOptions,
249
- ): (ts.ResolvedModule | undefined)[];
250
- }
251
- ```
252
-
253
- [Refer to the TypeScript Wiki for an example on how to write the `resolveModuleNames` function](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#customizing-module-resolution).
254
-
255
- Note that if you pass custom programs via `options.programs` this option will not have any effect over them (you can simply add the custom resolution on them directly).
256
-
257
- ### `parserOptions.emitDecoratorMetadata`
258
-
259
- Default `undefined`.
260
-
261
- This option allow you to tell parser to act as if `emitDecoratorMetadata: true` is set in `tsconfig.json`, but without [type-aware linting](https://typescript-eslint.io/docs/linting/typed-linting). In other words, you don't have to specify `parserOptions.project` in this case, making the linting process faster.
262
-
263
- ## Utilities
264
-
265
- ### `createProgram(configFile, projectDirectory)`
266
-
267
- This serves as a utility method for users of the `parserOptions.programs` feature to create a TypeScript program instance from a config file.
268
-
269
- ```ts
270
- declare function createProgram(
271
- configFile: string,
272
- projectDirectory?: string,
273
- ): import('typescript').Program;
274
- ```
275
-
276
- Example usage in .eslintrc.js:
277
-
278
- ```js
279
- const parser = require('@typescript-eslint/parser');
280
- const programs = [parser.createProgram('tsconfig.json')];
281
- module.exports = {
282
- parserOptions: {
283
- programs,
284
- },
285
- };
286
- ```
287
-
288
- ## Supported TypeScript Version
289
-
290
- Please see [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint) for the supported TypeScript version.
291
-
292
- **Please ensure that you are using a supported version before submitting any issues/bug reports.**
293
-
294
- ## Reporting Issues
295
-
296
- Please use the `@typescript-eslint/parser` issue template when creating your issue and fill out the information requested as best you can. This will really help us when looking into your issue.
297
-
298
- ## License
299
-
300
- TypeScript ESLint Parser is licensed under a permissive BSD 2-clause license.
301
-
302
- ## Contributing
303
-
304
- [See the contributing guide here](../../CONTRIBUTING.md)
10
+ > See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAO,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAEL,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAO9C,UAAU,oBAAoB;IAC5B,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG;QACtB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACzB,MAAM,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;KAC/B,CAAC;IACF,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AA+CD,iBAAS,KAAK,CACZ,IAAI,EAAE,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,23 +97,21 @@ function parseForESLint(code, options) {
97
97
  analyzeOptions.lib = getLib(compilerOptions);
98
98
  log('Resolved libs from program: %o', analyzeOptions.lib);
99
99
  }
100
- if (parserOptions.jsx === true) {
101
- if (analyzeOptions.jsxPragma === undefined &&
102
- compilerOptions.jsxFactory != null) {
103
- // in case the user has specified something like "preact.h"
104
- const factory = compilerOptions.jsxFactory.split('.')[0].trim();
105
- analyzeOptions.jsxPragma = factory;
106
- log('Resolved jsxPragma from program: %s', analyzeOptions.jsxPragma);
107
- }
108
- if (analyzeOptions.jsxFragmentName === undefined &&
109
- compilerOptions.jsxFragmentFactory != null) {
110
- // in case the user has specified something like "preact.Fragment"
111
- const fragFactory = compilerOptions.jsxFragmentFactory
112
- .split('.')[0]
113
- .trim();
114
- analyzeOptions.jsxFragmentName = fragFactory;
115
- log('Resolved jsxFragmentName from program: %s', analyzeOptions.jsxFragmentName);
116
- }
100
+ if (analyzeOptions.jsxPragma === undefined &&
101
+ compilerOptions.jsxFactory != null) {
102
+ // in case the user has specified something like "preact.h"
103
+ const factory = compilerOptions.jsxFactory.split('.')[0].trim();
104
+ analyzeOptions.jsxPragma = factory;
105
+ log('Resolved jsxPragma from program: %s', analyzeOptions.jsxPragma);
106
+ }
107
+ if (analyzeOptions.jsxFragmentName === undefined &&
108
+ compilerOptions.jsxFragmentFactory != null) {
109
+ // in case the user has specified something like "preact.Fragment"
110
+ const fragFactory = compilerOptions.jsxFragmentFactory
111
+ .split('.')[0]
112
+ .trim();
113
+ analyzeOptions.jsxFragmentName = fragFactory;
114
+ log('Resolved jsxFragmentName from program: %s', analyzeOptions.jsxFragmentName);
117
115
  }
118
116
  if (compilerOptions.emitDecoratorMetadata === true) {
119
117
  emitDecoratorMetadata = true;
@@ -1 +1 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":";;;;;;AAIA,oEAA2D;AAO3D,4EAG8C;AAC9C,kDAA0B;AAE1B,2CAA0C;AAE1C,M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MAAM,CAAC,eAAe,CAAC,CAAC;YAC7C,GAAG,CAAC,gCAAgC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;SAC3D;QACD,IACE,cAAc,CAAC,SAAS,KAAK,SAAS;YACtC,eAAe,CAAC,UAAU,IAAI,IAAI,EAClC;YACA,2DAA2D;YAC3D,MAAM,OAAO,GAAG,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAChE,cAAc,CAAC,SAAS,GAAG,OAAO,CAAC;YACnC,GAAG,CAAC,qCAAqC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;SACtE;QACD,IACE,cAAc,CAAC,eAAe,KAAK,SAAS;YAC5C,eAAe,CAAC,kBAAkB,IAAI,IAAI,EAC1C;YACA,kEAAkE;YAClE,MAAM,WAAW,GAAG,eAAe,CAAC,kBAAkB;iBACnD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;iBACb,IAAI,EAAE,CAAC;YACV,cAAc,CAAC,eAAe,GAAG,WAAW,CAAC;YAC7C,GAAG,CACD,2CAA2C,EAC3C,cAAc,CAAC,eAAe,CAC/B,CAAC;SACH;QACD,IAAI,eAAe,CAAC,qBAAqB,KAAK,IAAI,EAAE;YAClD,qBAAqB,GAAG,IAAI,CAAC;SAC9B;KACF;IAED,IAAI,qBAAqB,EAAE;QACzB,cAAc,CAAC,qBAAqB,GAAG,IAAI,CAAC;KAC7C;IAED,MAAM,YAAY,GAAG,IAAA,uBAAO,EAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAElD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAX,+BAAW,EAAE,CAAC;AACtD,CAAC;AAEe,wCAAc"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/parser",
3
- "version": "5.45.0",
3
+ "version": "5.47.0",
4
4
  "description": "An ESLint custom parser which leverages TypeScript ESTree",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -45,9 +45,9 @@
45
45
  "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@typescript-eslint/scope-manager": "5.45.0",
49
- "@typescript-eslint/types": "5.45.0",
50
- "@typescript-eslint/typescript-estree": "5.45.0",
48
+ "@typescript-eslint/scope-manager": "5.47.0",
49
+ "@typescript-eslint/types": "5.47.0",
50
+ "@typescript-eslint/typescript-estree": "5.47.0",
51
51
  "debug": "^4.3.4"
52
52
  },
53
53
  "devDependencies": {
@@ -71,5 +71,5 @@
71
71
  ]
72
72
  }
73
73
  },
74
- "gitHead": "267da4e416f7de6892336db8a2360d7af702b73c"
74
+ "gitHead": "a2c08ba41f51e0816c41649a63f80091731d9d8d"
75
75
  }
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 TypeScript ESLint and other contributors
3
+ Copyright (c) 2019 typescript-eslint and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,120 +1,8 @@
1
- <h1 align="center">TypeScript Scope Manager</h1>
1
+ # `@typescript-eslint/scope-manager`
2
2
 
3
- <p align="center">
4
- <img src="https://github.com/typescript-eslint/typescript-eslint/workflows/CI/badge.svg" alt="CI" />
5
- <a href="https://www.npmjs.com/package/@typescript-eslint/scope-manager"><img src="https://img.shields.io/npm/v/@typescript-eslint/scope-manager.svg?style=flat-square" alt="NPM Version" /></a>
6
- <a href="https://www.npmjs.com/package/@typescript-eslint/scope-manager"><img src="https://img.shields.io/npm/dm/@typescript-eslint/scope-manager.svg?style=flat-square" alt="NPM Downloads" /></a>
7
- </p>
3
+ [![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager)
4
+ [![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager)
8
5
 
9
- This is a fork of [`eslint-scope`](https://github.com/eslint/eslint-scope), enhanced to support TypeScript functionality.
10
- [You can view the original license for the code here](https://github.com/eslint/eslint-scope/blob/dbddf14d5771b21b5da704213e4508c660ca1c64/LICENSE).
6
+ 👉 See **https://typescript-eslint.io/architecture/scope-manager** for documentation on this package.
11
7
 
12
- This package is consumed automatically by [`@typescript-eslint/parser`](../parser).
13
- You probably don't want to use it directly.
14
-
15
- ## Getting Started
16
-
17
- **[You can find our Getting Started docs here](https://typescript-eslint.io/docs)**
18
-
19
- ## Installation
20
-
21
- ```bash
22
- $ yarn add -D typescript @typescript-eslint/scope-manager
23
- $ npm i --save-dev typescript @typescript-eslint/scope-manager
24
- ```
25
-
26
- ## API
27
-
28
- ### `analyze(tree, options)`
29
-
30
- Analyses a given AST and returns the resulting `ScopeManager`.
31
-
32
- ```ts
33
- interface AnalyzeOptions {
34
- /**
35
- * Known visitor keys.
36
- */
37
- childVisitorKeys?: Record<string, string[]> | null;
38
-
39
- /**
40
- * Which ECMAScript version is considered.
41
- * Defaults to `2018`.
42
- * `'latest'` is converted to 1e8 at parser.
43
- */
44
- ecmaVersion?: EcmaVersion | 1e8;
45
-
46
- /**
47
- * Whether the whole script is executed under node.js environment.
48
- * When enabled, the scope manager adds a function scope immediately following the global scope.
49
- * Defaults to `false`.
50
- */
51
- globalReturn?: boolean;
52
-
53
- /**
54
- * Implied strict mode (if ecmaVersion >= 5).
55
- * Defaults to `false`.
56
- */
57
- impliedStrict?: boolean;
58
-
59
- /**
60
- * The identifier that's used for JSX Element creation (after transpilation).
61
- * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement").
62
- * Defaults to `"React"`.
63
- */
64
- jsxPragma?: string;
65
-
66
- /**
67
- * The identifier that's used for JSX fragment elements (after transpilation).
68
- * If `null`, assumes transpilation will always use a member on `jsxFactory` (i.e. React.Fragment).
69
- * This should not be a member expression - just the root identifier (i.e. use "h" instead of "h.Fragment").
70
- * Defaults to `null`.
71
- */
72
- jsxFragmentName?: string | null;
73
-
74
- /**
75
- * The lib used by the project.
76
- * This automatically defines a type variable for any types provided by the configured TS libs.
77
- * For more information, see https://www.typescriptlang.org/tsconfig#lib
78
- *
79
- * Defaults to the lib for the provided `ecmaVersion`.
80
- */
81
- lib?: Lib[];
82
-
83
- /**
84
- * The source type of the script.
85
- */
86
- sourceType?: 'script' | 'module';
87
-
88
- /**
89
- * Emit design-type metadata for decorated declarations in source.
90
- * Defaults to `false`.
91
- */
92
- emitDecoratorMetadata?: boolean;
93
- }
94
- ```
95
-
96
- Example usage:
97
-
98
- ```ts
99
- import { analyze } from '@typescript-eslint/scope-manager';
100
- import { parse } from '@typescript-eslint/typescript-estree';
101
-
102
- const code = `const hello: string = 'world';`;
103
- const ast = parse(code, {
104
- // note that scope-manager requires ranges on the AST
105
- range: true,
106
- });
107
- const scope = analyze(ast, {
108
- ecmaVersion: 2020,
109
- sourceType: 'module',
110
- });
111
- ```
112
-
113
- ## References
114
-
115
- - https://eslint.org/docs/developer-guide/scope-manager-interface
116
- - https://github.com/eslint/eslint-scope
117
-
118
- ## Contributing
119
-
120
- [See the contributing guide here](../../CONTRIBUTING.md)
8
+ > See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/scope-manager",
3
- "version": "5.45.0",
3
+ "version": "5.47.0",
4
4
  "description": "TypeScript scope analyser for ESLint",
5
5
  "keywords": [
6
6
  "eslint",
@@ -38,12 +38,12 @@
38
38
  "typecheck": "nx typecheck"
39
39
  },
40
40
  "dependencies": {
41
- "@typescript-eslint/types": "5.45.0",
42
- "@typescript-eslint/visitor-keys": "5.45.0"
41
+ "@typescript-eslint/types": "5.47.0",
42
+ "@typescript-eslint/visitor-keys": "5.47.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/glob": "*",
46
- "@typescript-eslint/typescript-estree": "5.45.0",
46
+ "@typescript-eslint/typescript-estree": "5.47.0",
47
47
  "glob": "*",
48
48
  "jest-specific-snapshot": "*",
49
49
  "make-dir": "*",
@@ -63,5 +63,5 @@
63
63
  ]
64
64
  }
65
65
  },
66
- "gitHead": "267da4e416f7de6892336db8a2360d7af702b73c"
66
+ "gitHead": "a2c08ba41f51e0816c41649a63f80091731d9d8d"
67
67
  }
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 TypeScript ESLint and other contributors
3
+ Copyright (c) 2019 typescript-eslint and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,17 +1,12 @@
1
- <h1 align="center">TypeScript-ESTree Types</h1>
1
+ # `@typescript-eslint/types`
2
2
 
3
- <p align="center">
4
- <img src="https://github.com/typescript-eslint/typescript-eslint/workflows/CI/badge.svg" alt="CI" />
5
- <a href="https://www.npmjs.com/package/@typescript-eslint/types"><img src="https://img.shields.io/npm/v/@typescript-eslint/types.svg?style=flat-square" alt="NPM Version" /></a>
6
- <a href="https://www.npmjs.com/package/@typescript-eslint/types"><img src="https://img.shields.io/npm/dm/@typescript-eslint/types.svg?style=flat-square" alt="NPM Downloads" /></a>
7
- </p>
3
+ > Types for the TypeScript-ESTree AST spec
8
4
 
9
5
  This package exists to help us reduce cycles and provide lighter-weight packages at runtime.
10
- You probably don't want to use it directly.
11
6
 
12
- If you're building an ESLint plugin, consider using [`@typescript-eslint/utils`](../utils).
13
- If you're parsing TypeScript code, consider using [`@typescript-eslint/typescript-estree`](../typescript-estree).
7
+ ## Internal Package
14
8
 
15
- ## Contributing
9
+ This is an _internal package_ to the [typescript-eslint monorepo](https://github.com/typescript-eslint/typescript-eslint).
10
+ You likely don't want to use it directly.
16
11
 
17
- [See the contributing guide here](../../CONTRIBUTING.md)
12
+ 👉 See **https://typescript-eslint.io** for docs on typescript-eslint.
@@ -262,12 +262,6 @@ export declare interface AwaitExpression extends BaseNode {
262
262
  argument: Expression;
263
263
  }
264
264
  export declare interface BaseNode extends NodeOrTokenData {
265
- /**
266
- * The parent node of the current node
267
- *
268
- * This is added in the @typescript-eslint/types package as ESLint adds it
269
- * while traversing.
270
- */
271
265
  type: AST_NODE_TYPES;
272
266
  }
273
267
  declare interface BaseToken extends NodeOrTokenData {
@@ -262,12 +262,6 @@ export declare interface AwaitExpression extends BaseNode {
262
262
  argument: Expression;
263
263
  }
264
264
  export declare interface BaseNode extends NodeOrTokenData {
265
- /**
266
- * The parent node of the current node
267
- *
268
- * This is added in the @typescript-eslint/types package as ESLint adds it
269
- * while traversing.
270
- */
271
265
  type: AST_NODE_TYPES;
272
266
  }
273
267
  declare interface BaseToken extends NodeOrTokenData {