-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
519 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [JensAstrup] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
import path from 'node:path' | ||
import { fileURLToPath } from 'node:url' | ||
|
||
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat' | ||
import { FlatCompat } from '@eslint/eslintrc' | ||
import js from '@eslint/js' | ||
import stylistic from '@stylistic/eslint-plugin' | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin' | ||
import tsParser from '@typescript-eslint/parser' | ||
import _import from 'eslint-plugin-import' | ||
import jest from 'eslint-plugin-jest' | ||
import perfectionist from 'eslint-plugin-perfectionist' | ||
import yenz from 'eslint-plugin-yenz' | ||
import globals from 'globals' | ||
|
||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}) | ||
|
||
export default [...fixupConfigRules(compat.extends( | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript', | ||
'plugin:jest/recommended', | ||
'plugin:@stylistic/recommended-extends', | ||
)), { | ||
plugins: { | ||
'@typescript-eslint': fixupPluginRules(typescriptEslint), | ||
'@stylistic': fixupPluginRules(stylistic), | ||
'perfectionist': fixupPluginRules(perfectionist), | ||
'import': fixupPluginRules(_import), | ||
yenz, | ||
'jest': fixupPluginRules(jest), | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.jest, | ||
...globals.node, | ||
...globals.browser, | ||
...globals.webextensions, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
|
||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
}, | ||
|
||
rules: { | ||
'yenz/type-ordering': 'error', | ||
'yenz/no-loops': 'error', | ||
'dot-notation': 'error', | ||
'indent': ['error', 2], | ||
'linebreak-style': ['error', 'unix'], | ||
'no-case-declarations': 'off', | ||
|
||
'no-console': ['error', { | ||
allow: ['error', 'warn'], | ||
}], | ||
|
||
'no-magic-numbers': ['error', { | ||
ignoreArrayIndexes: true, | ||
ignore: [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | ||
}], | ||
|
||
'no-use-before-define': 'off', | ||
'quotes': ['error', 'single'], | ||
'semi': ['error', 'never'], | ||
'brace-style': ['error', 'stroustrup'], | ||
'perfectionist/sort-enums': 'off', | ||
'perfectionist/sort-imports': 'off', | ||
'perfectionist/sort-named-exports': 'off', | ||
'perfectionist/sort-named-imports': 'off', | ||
'perfectionist/sort-union-types': 'off', | ||
'perfectionist/sort-classes': 'off', | ||
'perfectionist/sort-interfaces': 'off', | ||
'perfectionist/sort-objects': 'off', | ||
'perfectionist/sort-object-types': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'error', | ||
'@typescript-eslint/explicit-member-accessibility': 'off', | ||
'@typescript-eslint/no-confusing-void-expression': 'error', | ||
'@typescript-eslint/no-unnecessary-condition': 'error', | ||
'@typescript-eslint/prefer-find': 'error', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@stylistic/no-multiple-empty-lines': 'off', | ||
'@stylistic/comma-dangle': 'off', | ||
'@stylistic/indent': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
|
||
'@typescript-eslint/no-unused-vars': ['error', { | ||
varsIgnorePattern: '^_$', | ||
argsIgnorePattern: '^_$', | ||
}], | ||
|
||
'padding-line-between-statements': ['error', { | ||
blankLine: 'always', | ||
prev: 'function', | ||
next: '*', | ||
}, { | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'function', | ||
}], | ||
|
||
'import/no-named-as-default': 'off', | ||
|
||
'import/order': ['error', { | ||
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], | ||
|
||
'pathGroups': [{ | ||
pattern: '@sx/**', | ||
group: 'internal', | ||
}], | ||
|
||
'pathGroupsExcludedImportTypes': ['builtin'], | ||
'newlines-between': 'always', | ||
|
||
'alphabetize': { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
}], | ||
|
||
'import/newline-after-import': ['error', { | ||
count: 2, | ||
}], | ||
}, | ||
}, { | ||
files: ['**/*.test.*'], | ||
|
||
rules: { | ||
'no-magic-numbers': 'off', | ||
}, | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
const PROMPT = 'You help make sure that tickets are ready for development. What sorts of technical questions should I ask before beginning development. The basic fundamentals of our application are already setup and not open questions (database, etc). Do not ask questions about the following: 1. Unit Testing 2. Basic Architecture Setup (Database, etc) 3. Deadlines 4) Concurrency\n' + | ||
'\n' + | ||
'Examples of good questions: - Are there performance or scalability requirements or considerations for the feature?\' - What user roles and permissions need to be accounted for within this feature? - What new monitoring or alerting should be put in place? - Should we consider implementing a feature flag\' - Have all instances where the deprecated model is used been identified\n' + | ||
'Examples of bad questions: - What are the technical and business requirements for the feature?(too broad) - How will the system access and query the Customers database?(implementation already known) - What are the specific user story requirements and how do they align with the broader application requirements? (too broad)\n' + | ||
'\n' + | ||
'Give the top 5 questions in a concise manner, just state the questions without any intro. ' | ||
const PROMPT = 'You help make sure that tickets are ready for development. What sorts of technical questions should I ask before beginning development. The basic fundamentals of our application are already setup and not open questions (database, etc). Do not ask questions about the following: 1. Unit Testing 2. Basic Architecture Setup (Database, etc) 3. Deadlines 4) Concurrency\n' | ||
+ '\n' | ||
+ 'Examples of good questions: - Are there performance or scalability requirements or considerations for the feature?\' - What user roles and permissions need to be accounted for within this feature? - What new monitoring or alerting should be put in place? - Should we consider implementing a feature flag\' - Have all instances where the deprecated model is used been identified\n' | ||
+ 'Examples of bad questions: - What are the technical and business requirements for the feature?(too broad) - How will the system access and query the Customers database?(implementation already known) - What are the specific user story requirements and how do they align with the broader application requirements? (too broad)\n' | ||
+ '\n' | ||
+ 'Give the top 5 questions in a concise manner, just state the questions without any intro. ' | ||
|
||
export default PROMPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import {v4 as uuidv4} from 'uuid' | ||
import { v4 as uuidv4 } from 'uuid' | ||
|
||
|
||
export async function getOrCreateClientId(): Promise<string> { | ||
const result = await chrome.storage.sync.get('clientId') | ||
let clientId: string = result.clientId | ||
if (!clientId) { | ||
clientId = uuidv4() | ||
await chrome.storage.sync.set({clientId}) | ||
await chrome.storage.sync.set({ clientId }) | ||
} | ||
return clientId | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export const GA_ENDPOINT = 'https://www.google-analytics.com/mp/collect' | ||
export const MEASUREMENT_ID = process.env.GOOGLE_MEASUREMENT_ID | ||
export const GOOGLE_ANALYTICS_API_SECRET = process.env.GOOGLE_ANALYTICS_API_SECRET | ||
export const DEFAULT_ENGAGEMENT_TIME_IN_MSEC = 100 | ||
export const DEFAULT_ENGAGEMENT_TIME_IN_MSEC = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import {Story} from '@sx/utils/story' | ||
import { Story } from '@sx/utils/story' | ||
|
||
|
||
export async function analyzeStoryDescription(activeTabUrl: string) { | ||
export async function analyzeStoryDescription(activeTabUrl: string): Promise<void> { | ||
if (activeTabUrl.includes('story')) { | ||
const description = Story.description | ||
await chrome.runtime.sendMessage({ | ||
action: 'callOpenAI', | ||
data: {prompt: description} | ||
data: { prompt: description } | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/js/development-time/find-first-matching-element-for-state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.