prettier-eslint |
eslint-plugin-prettier |
eslint-config-prettier |
|
---|---|---|---|
What it is | A JavaScript module exporting a single function. | An ESLint plugin. | An ESLint configuration. |
What it does | Runs the code (string) through prettier then eslint --fix . The output is also a string. |
Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. | This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb . |
How to use it | Either calling the function in your code or via [prettier-eslint-cli ](https://github.co |
This file contains hidden or 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
System: Host: xunil Kernel: 4.10.0-20-generic x86_64 (64 bit gcc: 5.4.0) | |
Desktop: Cinnamon 3.2.7 (Gtk 2.24.30) dm: mdm Distro: Linux Mint 18.1 Serena | |
Machine: System: ASUSTeK (portable) product: K501UX v: 1.0 | |
Mobo: ASUSTeK model: K501UX v: 1.0 Bios: American Megatrends v: K501UX.209 date: 01/20/2016 | |
CPU: Dual core Intel Core i7-6500U (-HT-MCP-) cache: 4096 KB | |
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10368 | |
clock speeds: min/max: 400/3100 MHz 1: 477 MHz 2: 487 MHz 3: 499 MHz 4: 490 MHz | |
Graphics: Card-1: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1916 | |
Card-2: NVIDIA GM107M [GeForce GTX 950M] bus-ID: 01:00.0 chip-ID: 10de:139a | |
Display Server: X.Org 1.18.4 driver: intel Resolution: [email protected], [email protected] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
// server/app.js | |
const express = require('express'); | |
const morgan = require('morgan'); | |
const path = require('path'); | |
const app = express(); | |
// Setup logger | |
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms')); |
This file contains hidden or 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
var BatchStream = require('batch-stream2') | |
var gulp = require('gulp') | |
var coffee = require('gulp-coffee') | |
var uglify = require('gulp-uglify') | |
var cssmin = require('gulp-minify-css') | |
var bower = require('gulp-bower-files') | |
var stylus = require('gulp-stylus') | |
var livereload = require('gulp-livereload') | |
var include = require('gulp-include') | |
var concat = require('gulp-concat') |
This file contains hidden or 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
<template> | |
<require from="./modal"></require> | |
<modal> | |
<div slot="modalHeader">This is user provided header content.</div> | |
</modal> | |
</template> |
This file contains hidden or 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
<template> | |
<require from="./expression"></require> | |
<button class="button-outline button-small" | |
repeat.for="example of examples" | |
click.delegate="expressionString = example.expression"> | |
${example.name} | |
</button> | |
<label class="expression-input"> |
This file contains hidden or 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
<template> | |
<require from="./expression"></require> | |
<button class="button-outline button-small" | |
repeat.for="example of examples" | |
click.delegate="expressionString = example.expression"> | |
${example.name} | |
</button> | |
<label class="expression-input"> |
This file contains hidden or 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
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jwt'); |
This file contains hidden or 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
var hbs = require('express-hbs'), | |
api = require('core/server/api'), | |
_ = require('lodash'), | |
async = require('express-hbs/lib/async'), // To redefine `registerAsyncHelper` | |
registerAsyncHelper; | |
// Redefine `registerAsyncHelper` from `express-hbs` | |
registerAsyncHelper = function (name, fn) { | |
hbs.handlebars.registerHelper(name, function (context, options) { | |
// Pass `[context, options]` as arg instead of `context` only |