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 workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Linting | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] |
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
const flatter = args => { | |
const arr = [...args] | |
const arrFlat = [] | |
const _iterator = (arrTemp) => { | |
arrTemp.forEach(item => item.push ? _iterator(item) : arrFlat.push(item)) | |
return arrFlat | |
} | |
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
const setValue = state => { | |
this.state = state || 0 | |
this.set = value => { | |
this.state += value | |
return setValue(this.state) | |
} | |
this.get = () => this.state |
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
const carr = a => b => !b ? a : carr(a + b) | |
const result = carr(1)(2)(12)(22)() | |
console.log(result) |
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
const strToObj = (arg) => { | |
const arr = arg.push ? arg : arg.split('.') | |
const obj = {} | |
const _recursiveParsing = (arrBuff, objBuff) => { | |
if (arrBuff.length === 0) { | |
return obj | |
} |
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
const webpack = require('webpack') | |
const path = require('path') | |
// CSS Optimization Plugins | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin') | |
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') | |
// JS Optimization Plugins | |
const TerserPlugin = require('terser-webpack-plugin') |
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
// CONSTANTS | |
$pixels-density-list: 1 2; | |
$webp-support: '.webp-support'; | |
$webp-format: 'webp'; | |
// LAYOUTS LIST BELOW | |
$resoultions-tablet_mobile: tablet 'max-width: 1000px', mobile 'max-width: 600px'; | |
$resoultions-only_tablet: tablet 'max-width: 1000px',; // "," - is a hack for a single object props; | |
$resoultions-only_mobile: mobile 'max-width: 600px',; // "," - is a hack for a single object props; |
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
var timerID = null | |
document.addEventListener('dblclick', function() { | |
console.log('double click!'); | |
if (timerID) { | |
clearTimeout(timerID); | |
timerID = null; | |
} |
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
... | |
... | |
... | |
"scripts": { | |
"start:dev": "better-npm-run start:dev", | |
"start:prod": "better-npm-run start:prod", | |
"test": "better-npm-run test", | |
"clean": "rimraf dist", | |
"push": "npm run lint && git push", | |
"compile": "better-npm-run compile", |
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
module.exports = { | |
useTabs: false, | |
printWidth: 120, | |
tabWidth: 2, | |
singleQuote: true, | |
trailingComma: 'none', | |
jsxBracketSameLine: false, | |
semi: false | |
}; |