Skip to content

Instantly share code, notes, and snippets.

View yyynnn's full-sized avatar
💭
🦄 Like a horned zebra

Sergio yyynnn

💭
🦄 Like a horned zebra
View GitHub Profile
@yyynnn
yyynnn / .huskyrc.js
Created March 17, 2020 15:08
huskyrc.js
module.exports = {
hooks: {
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS'
}
}
@yyynnn
yyynnn / .gitlab-ci.yml
Created March 17, 2020 14:18
gitlab-ci.yml
stages:
- stage:release
# This version is important! See https://github.com/semantic-release/gitlab/issues/139
image: node:12.14.1
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
@yyynnn
yyynnn / release.config.js
Created March 17, 2020 13:53
release.config.js
/* eslint-disable no-template-curly-in-string */
const gitlabUrl = 'https://gitlab.com'
const gitlabApiPathPrefix = '/api/v4'
const assets = [
{ path: 'index.js', label: 'JS distribution' }
]
const verifyConditions = [
['@semantic-release/changelog'],
@yyynnn
yyynnn / package.json
Created March 17, 2020 13:51
sem rel package.json
// package.json
{
"name": "semantic_release_example",
"description": "example frontend app",
"version": "1.0.0",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://gitlab.com/yyynnn/semantic_release_example.git"
},
@yyynnn
yyynnn / commitlint.config.js
Created March 17, 2020 13:26
commitlint config
module.exports = {
plugins: ['commitlint-plugin-jira-rules'],
extends: ['jira'],
rules: {
'jira-task-id-separator': [0],
'jira-task-id-case': [0],
'jira-task-id-min-length': [0],
'jira-commit-status-case': [0],
'header-max-length': [0],
'jira-task-id-max-length': [0],
import { compose, withHandlers } from 'recompose'
import { animateScroll } from 'react-scroll'
const scrollToFirstError = errors => {
const errorFields = errors
// Using breakable for loop
for (let i = 0; i < errorFields.length; i++) {
const fieldName = `position-${errorFields[i]}`
// Checking if the marker exists in DOM
const elements = document.querySelectorAll(`[name="${fieldName}"]`)