Skip to content

Instantly share code, notes, and snippets.

@Manyaka
Manyaka / getAjax.js
Created August 29, 2019 07:08
ajax on promise
const getAjax = url => {
return new Promise((resolve, reject) => {
let xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.responseType = 'json';
xhr.addEventListener('load', () => {
if (xhr.status === 200) {
resolve(xhr.response);
} else {
{
"types": {
"feat": {
"description": "A new feature",
"title": "Features"
},
"fix": {
"description": "A bug fix",
"title": "Bug Fixes"
},
@Manyaka
Manyaka / postcss.config.js
Last active August 14, 2019 10:14
postcss.config.js
module.exports = {
plugins: {
'postcss-easy-import': {
prefix: '_'
},
'postcss-nested': {},
autoprefixer: {},
},
};
@Manyaka
Manyaka / vue.config.js
Created August 14, 2019 09:44
vue.config.js
module.exports = {
css: {
modules: true,
sourceMap: true,
loaderOptions: {
sass: {
data: `@import "@/assets/css/libs/variables.scss";`
}
}
},
@Manyaka
Manyaka / .prettierrc
Last active June 1, 2020 15:59
.prettierrc ver2, теперь и виде npm пакета: https://www.npmjs.com/package/@manyaka/prettier-config
{
"$schema": "http://json.schemastore.org/prettierrc",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"htmlWhitespaceSensitivity": "ignore",
"vueIndentScriptAndStyle": true
}
@Manyaka
Manyaka / .browserslistrc
Last active October 8, 2020 09:01
.browserslistrc
[development]
last 1 chrome version
last 1 firefox version
[production]
defaults
ie 11
[staging]
defaults
@Manyaka
Manyaka / .ruby-version
Created August 14, 2019 08:53
.ruby-version
ruby-2.6.3
@Manyaka
Manyaka / .ruby-gemset
Created August 14, 2019 08:52
.ruby-gemset
chat-evil-martians
@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 / .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: