Skip to content
Merged
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
6 changes: 6 additions & 0 deletions extensions/ql-vscode/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.vscode-test/
node_modules/
out/

# Include the Storybook config
!.storybook
2 changes: 1 addition & 1 deletion extensions/ql-vscode/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
project: ["tsconfig.json", "./src/**/tsconfig.json", "./gulpfile.ts/tsconfig.json"],
project: ["tsconfig.json", "./src/**/tsconfig.json", "./gulpfile.ts/tsconfig.json", "./scripts/tsconfig.json", "./.storybook/tsconfig.json"],
},
plugins: ["@typescript-eslint"],
env: {
Expand Down
2 changes: 1 addition & 1 deletion extensions/ql-vscode/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '@vscode/codicons/dist/codicon.css';
// https://storybook.js.org/docs/react/configure/overview#configure-story-rendering
export const parameters = {
// All props starting with `on` will automatically receive an action as a prop
actions: { argTypesRegex: "^on[A-Z].*" },
actions: { argTypesRegex: '^on[A-Z].*' },
// All props matching these names will automatically get the correct control
controls: {
matchers: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function config(entry = []) {
return [...entry, require.resolve("./preview.ts")];
return [...entry, require.resolve('./preview.ts')];
}

export function managerEntries(entry = []) {
return [...entry, require.resolve("./manager.tsx")];
return [...entry, require.resolve('./manager.tsx')];
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export enum VSCodeTheme {
export const themeNames: { [key in VSCodeTheme]: string } = {
[VSCodeTheme.Dark]: 'Dark+',
[VSCodeTheme.Light]: 'Light+',
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from
import { VSCodeTheme } from './theme';

const themeFiles: { [key in VSCodeTheme]: string } = {
// eslint-disable-next-line @typescript-eslint/no-var-requires
[VSCodeTheme.Dark]: require('!file-loader?modules!../../src/stories/vscode-theme-dark.css').default,
// eslint-disable-next-line @typescript-eslint/no-var-requires
[VSCodeTheme.Light]: require('!file-loader?modules!../../src/stories/vscode-theme-light.css').default,
}
};

export const withTheme = (
StoryFn: StoryFunction<AnyFramework>,
Expand All @@ -18,7 +20,7 @@ export const withTheme = (
const styleSelectorId =
context.viewMode === 'docs'
? `addon-vscode-theme-docs-${context.id}`
: `addon-vscode-theme-theme`;
: 'addon-vscode-theme-theme';

const theme = Object.values(VSCodeTheme).includes(vscodeTheme) ? vscodeTheme as VSCodeTheme : VSCodeTheme.Dark;

Expand Down
4 changes: 2 additions & 2 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1254,8 +1254,8 @@
"integration": "node ./out/vscode-tests/run-integration-tests.js no-workspace,minimal-workspace",
"cli-integration": "npm run preintegration && node ./out/vscode-tests/run-integration-tests.js cli-integration",
"update-vscode": "node ./node_modules/vscode/bin/install",
"format": "tsfmt -r && eslint src test --ext .ts,.tsx --fix",
"lint": "eslint src test --ext .ts,.tsx --max-warnings=0",
"format": "tsfmt -r && eslint . --ext .ts,.tsx --fix",
"lint": "eslint . --ext .ts,.tsx --max-warnings=0",
"format-staged": "lint-staged",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
Expand Down
6 changes: 3 additions & 3 deletions extensions/ql-vscode/scripts/fix-scenario-file-numbering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import * as fs from 'fs-extra';
import * as path from 'path';

if (process.argv.length !== 3) {
console.error('Expected 1 argument - the scenario name')
console.error('Expected 1 argument - the scenario name');
}

const scenarioName = process.argv[2];
Expand All @@ -39,7 +39,7 @@ async function fixScenarioFiles() {
});

let index = 0;
for (let file of orderedFiles) {
for (const file of orderedFiles) {
const ext = path.extname(file);
if (ext === '.json') {
const fileName = path.basename(file, ext);
Expand All @@ -66,7 +66,7 @@ async function fixScenarioFiles() {
await fs.writeJSON(newFilePath, json);
}
}

index++;
}
}
Expand Down
6 changes: 6 additions & 0 deletions extensions/ql-vscode/scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../tsconfig.json",
"include": ["**/*.ts"],
"exclude": []
}