Skip to content

Instantly share code, notes, and snippets.

View azinit's full-sized avatar
🏠
Working from home

Ilya Azin azinit

🏠
Working from home
View GitHub Profile
@azinit
azinit / input.scss
Created June 27, 2022 15:06
Generated by SassMeister.com.
@keyframes rotation {
@for $i from 0 through 47 {
#{$i / 47 * 100}% {
background-position: calc(#{$i} * -464px) 0;
}
}
}
// background-image: url("./assets/rotation/coin_rotation_2s#{$i}.jpg");
@azinit
azinit / .eslintrc.js
Created May 19, 2021 07:23
imports-linting: order, access
/** Разрешенные импорты (для сортировки) */
const ALLOWED_PATH_GROUPS = ["pages/**", "features/**", "entities/**", "shared/**"].map(
(pattern) => ({
pattern,
group: "internal",
position: "after",
}),
);
/** Для запрета приватных путей */
"todo-tree.regex.regex": "(//|\\*)\\s*($TAGS).*(\\n\\s*//\\s{2,}.*)*",
"todo-tree.general.tags": [
"TODO",
"FIXME",
"BUG",
"NOTE",
"!!!",
],
"todo-tree.highlights.defaultHighlight": {
"type": "whole-line",
"colorTabs.config": [
{
"regex": ".*\/store.*",
"color": "#593D88",
},
{
"regex": ".*stories.tsx",
// "color": "#26C6DA",
// "color": "#ac446d",
"color": "#6b4354",
@azinit
azinit / react-structure.md
Last active November 14, 2020 11:03
React app files structure

Structure

At the moment I prefer Feature Driven Development for projects structuring.

Principles

  • low coupling
    • feature should not depend from other features
    • page should not depend from other pages
    • shared resources should not depend from each other
  • all needed resources (store / async effects / components) - locate in features/ dir
  • all common used resources (components / helpers / fixtures) - locate in shared/ dir