Skip to content

Instantly share code, notes, and snippets.

View binjospookie's full-sized avatar
🌿

Viktor Pasynok binjospookie

🌿
View GitHub Profile
@binjospookie
binjospookie / storeName.mjs
Created November 9, 2024 16:04
storeName.mjs
import { ESLintUtils } from '@typescript-eslint/utils';
const createRule = ESLintUtils.RuleCreator(() => '');
export const storeNamingConvention = createRule({
name: 'store-naming-convention',
meta: {
type: 'layout',
docs: {
description: 'Enforce $ as a prefix or postfix for any store created by Effector methods',
@binjospookie
binjospookie / hook.ts
Created September 24, 2024 10:08
hook
/* eslint-disable @typescript-eslint/no-explicit-any, functional/immutable-data, no-restricted-syntax */
import { type Store, type StoreValue, useStoreMap } from '@grlt/vendors/state';
import { mergeDeepRight, notEquals } from '../../../helpers/helpers';
import type { NonEmptyArray, Paths } from '../../../types/types';
import { useStableKeys } from '../useStableKeys';
type GetByPath<T, Path extends string> = Path extends `${infer K}.${infer Rest}`
? K extends keyof T
? { [Key in K]: GetByPath<T[K], Rest> }
@binjospookie
binjospookie / spec-d.ts
Last active September 19, 2024 15:58
test
/* eslint-disable react-hooks/rules-of-hooks */
import { createStore } from '@grlt/vendors/state';
import { createHookWithStoreGetter } from '../index';
const $myKv = createStore({
a: 1,
b: '2',
c: {
const addExternalProcessingData = declareAction<Record<string, unknown>>();
const EVENTS = {
[EVENT_NAME.ADD_PROCESSING_DATA]: addExternalProcessingData,
} as const;
const makeCall = (store: Store) => ({
name,
payload,
}: {

Анимации для игры:

Основное:

module.exports = {
printWidth: 120,
parser: 'typescript',
useTabs: false,
singleQuote: true,
trailingComma: 'all',
};
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"rules": {
"quotemark": [
true,
"single",
"jsx-double"
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"jsx": "react",
"strict": true,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"lib": [ "es2017", "dom" ],