Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dev/typescript/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ export function filterProjectsByFlag(projectFlag?: string) {
}

const tsConfigPath = resolve(projectFlag);
return PROJECTS.filter(project => project.tsConfigPath === tsConfigPath);
return PROJECTS.filter(project => project.tsConfigPath.includes(tsConfigPath));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it useful to be able to run tslint for x-pack like this:
node scripts/tslint --project x-pack

Is that okay, or should I revert this change?

Copy link
Copy Markdown
Contributor

@spalger spalger Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine with something a little bit stricter, maybe:

project.tsConfigPath === tsConfigPath || project.tsConfigPath === resolve(tsConfigPath, 'tsconfig.json')

Pretty sure as is --project . will match any tsconfig.json file, depending on which one is first.

}
4 changes: 4 additions & 0 deletions tslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ rules:
* specific language governing permissions and limitations
* under the License.
*/

linterOptions:
exclude:
- ./**/*.json
13 changes: 0 additions & 13 deletions x-pack/plugins/apm/typings/global_types.d.ts

This file was deleted.

1 change: 1 addition & 0 deletions x-pack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"test/**/*"
],
"compilerOptions": {
"resolveJsonModule": true,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially added this to kibana/tsconfig.json but it caused problems in kbn-pm/tsconfig.json and kibana/tsconfig.browser.json since they do not emit commonjs. I can probably override this with "resolveJsonModule": false if necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you wouldn't mind setting this in the root config and negating it where necessary that would keep the compilerOptions a little more consistent across projects, which is desirable.

"paths": {
"ui/*": [
"src/ui/public/*"
Expand Down