Skip to content

Instantly share code, notes, and snippets.

View BiosBoy's full-sized avatar
⛰️
The bigger you know - the less you scared of.

Sviat Kuzhelev BiosBoy

⛰️
The bigger you know - the less you scared of.
View GitHub Profile
@BiosBoy
BiosBoy / linting.yml
Created October 30, 2020 12:13
Linting CI workflow based on GitHub Actions. For JavaScript/React projects
# 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 ]
const flatter = args => {
const arr = [...args]
const arrFlat = []
const _iterator = (arrTemp) => {
arrTemp.forEach(item => item.push ? _iterator(item) : arrFlat.push(item))
return arrFlat
}
const setValue = state => {
this.state = state || 0
this.set = value => {
this.state += value
return setValue(this.state)
}
this.get = () => this.state
const carr = a => b => !b ? a : carr(a + b)
const result = carr(1)(2)(12)(22)()
console.log(result)
const strToObj = (arg) => {
const arr = arg.push ? arg : arg.split('.')
const obj = {}
const _recursiveParsing = (arrBuff, objBuff) => {
if (arrBuff.length === 0) {
return obj
}
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')
// 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;
var timerID = null
document.addEventListener('dblclick', function() {
console.log('double click!');
if (timerID) {
clearTimeout(timerID);
timerID = null;
}
...
...
...
"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",
module.exports = {
useTabs: false,
printWidth: 120,
tabWidth: 2,
singleQuote: true,
trailingComma: 'none',
jsxBracketSameLine: false,
semi: false
};