This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const before = (target, f) => { | |
const then = target.then.bind(target) | |
target.then = (resolve, reject) => | |
f(target).then(() => then(resolve, reject), reject) | |
return target | |
} | |
Knex.QueryBuilder.extend('amodify', function (f) { | |
const q = this | |
const clone = this.clone.bind(this) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"trailingComma": "none", | |
"tabWidth": 4, | |
"semi": false, | |
"singleQuote": true, | |
"quoteProps": "as-needed", | |
"arrowParens": "avoid", | |
"parser": "typescript" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add - dev eslint-config-prettier | |
yarn add - dev eslint-config-standard | |
yarn add - dev eslint-plugin-import | |
yarn add - dev eslint-plugin-n | |
yarn add - dev eslint-plugin-prettier | |
yarn add - dev eslint-plugin-promise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Tested on LunarVim | |
-- optional: set your prefered indent with size | |
vim.opt.shiftwidth = 4 | |
vim.opt.tabstop = 4 | |
-- load required null-ls references | |
local h = require("null-ls.helpers") | |
local cmd_resolver = require("null-ls.helpers.command_resolver") | |
local methods = require("null-ls.methods") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm add --location=global prettier-eslint-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// yarn add --dev @esbuild-plugins/node-globals-polyfill | |
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill' | |
// yarn add --dev @esbuild-plugins/node-modules-polyfill | |
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill' | |
// You don't need to add this to deps, it's included by @esbuild-plugins/node-modules-polyfill | |
import rollupNodePolyFill from 'rollup-plugin-node-polyfills' | |
export default { | |
resolve: { | |
alias: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const of = x => ({ '@@type': 'A', x }) | |
export const f1 = a => a.x | |
f1.arity = 1 | |
export const f2 = c => a => a.x + c | |
f2.arity = 2 | |
export const f3 = d => c => a => a.x + c + d | |
f3.arity = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const f1 = a => a.x | |
f1.arity = 1 | |
export const f2 = c => a => a.x + c | |
f2.arity = 2 | |
export const f3 = d => c => a => a.x + c + d |
NewerOlder