Skip to content

Instantly share code, notes, and snippets.

@Manyaka
Manyaka / .scss-lint.yml
Created August 14, 2019 07:17
.scss-lint.yml
exclude: 'email-templates/**/*'
linters:
Comment:
allowed: '^[/* ]'
HexLength:
style: 'long'
ImportantRule:
enabled: false
LeadingZero:
@Manyaka
Manyaka / .editorconfig
Created August 14, 2019 07:04
.editorconfig
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# для всех файлов
[*]
charset = utf-8
end_of_line = lf
indent_style = space
@Manyaka
Manyaka / .csscomb.json
Last active April 20, 2020 07:10
.csscomb.json
{
"formatOnSave": true,
"block-indent": 2,
"lines-between-rulesets": 1,
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
@Manyaka
Manyaka / Modal.vue
Last active May 11, 2019 19:31
принцип открытия модальных окон во вью
<template>
<div class="Modal">
<button v-on:click="isVisible = true" type="button">Показать попап</button>
<modal v-bind:show="isVisible">
<div>какой то контент</div>
</modal>
</div>
</template>
<script>
@Manyaka
Manyaka / .eslintrc.js
Last active May 28, 2021 08:40
.eslintrc.js
module.exports = {
root: true,
env: {
es2021: true,
browser: true,
node: true
},
plugins: [
@Manyaka
Manyaka / component.vue
Last active July 9, 2019 02:40
Три способа получить пустой объект во Vue.js, потому что, из-за системы реактивности, в объект приезжают свойства от Observer.
props: {
someObject: {
type: Object,
default: () => ({}),
},
},
created() {
console.log(this.someObject); // {__ob__: Observer}
let variant1 = JSON.parse(JSON.stringify(this.someObject));