Skip to content

Instantly share code, notes, and snippets.

module.exports = {
meta: {
type: "problem",
docs: {
description: "replace certain import paths with aliased paths",
category: "Stylistic Issues",
recommended: false,
},
fixable: "code",
schema: []
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "disallow generic variable names to promote descriptive naming",
category: "Stylistic Issues",
recommended: false,
url: "https://github.com/yourusername/eslint-plugin-yourpluginname/blob/main/docs/rules/no-generic-names.md"
},
schema: [],
const rule = require('../../../lib/rules/short-variable-name');
const { RuleTester } = require('eslint');
const ruleTester = new RuleTester({
parserOptions: { ecmaVersion: 2020 }
});
ruleTester.run('short-variable-name', rule, {
valid: [
'const alpha = 20;',
@B0und
B0und / main.py
Created June 17, 2021 12:21
Convert png files to one pdf, with transparency replaced with white colour
"""
Convert png files to one pdf, with transparency replaced with white colour
"""
import glob
from PIL import Image
IMG_FOLDER = "rez"
files = []
for img in glob.glob(f"{IMG_FOLDER}/*.png"):
rgba = Image.open(img)
@B0und
B0und / convert_ui_and_qrc_files.py
Last active August 25, 2020 20:41
Automatically convert qt designer .ui and .qrc files to .py
"""
Recursively looks through files and converts .ui and .qrc qt designer files to python code.
Just import this file at the top of your main module.(Dont forget to comment out before deploying)
"""
import os
from pathlib import Path
# convert interface
for path in Path('').rglob('*.ui'):
path_folder = path.parents[0]