Skip to content

Instantly share code, notes, and snippets.

@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));
@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 / 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 / .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 / .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 / .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 / .slim-lint.yml
Created August 14, 2019 07:18
.slim-lint.yml
exclude:
- 'app/views/markup/**/*.slim'
- 'app/views/admin/base/_editor_icons.html.slim'
- 'app/views/layouts/mailer.html.slim'
linters:
CommentControlStatement:
enabled: true
ConsecutiveControlStatements:
@Manyaka
Manyaka / coffeelint.json
Created August 14, 2019 07:19
coffeelint.json
{
"coffeescript_error": {
"level": "error"
},
"cyclomatic_complexity": {
"level": "warn",
"value": 10
},
"max_line_length": {
"name": "max_line_length",
@Manyaka
Manyaka / .ruby-gemset
Created August 14, 2019 08:52
.ruby-gemset
chat-evil-martians
@Manyaka
Manyaka / .ruby-version
Created August 14, 2019 08:53
.ruby-version
ruby-2.6.3