Install dependencies locally
npm install -D eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import prettier eslint-plugin-prettier eslint-plugin-jsx-a11y eslint-plugin-react flow-bin
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
init() { | |
setTimeout(()=>{ | |
this.set('value', | |
` | |
<h2>Permito qualquer tag?</h2> |
{ | |
"extends": "eslint-config-airbnb", | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"sourceType": "module" | |
}, | |
"ecmaFeatures": { | |
"classes": true, | |
"jsx": true | |
}, |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
/** | |
* # Shell interval helper | |
* | |
* Quick deno helper to call given command each given time. | |
* | |
* ## Installation: | |
* | |
* ```sh | |
* deno install -f --allow-run -n interval https://gist.githubusercontent.com/edygar/a1a25656d02a53c867a90fa7389ea44f/raw/interval.ts | |
* ``` |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
import * as path from "https://deno.land/std@0.75.0/path/mod.ts"; | |
import * as fs from "https://deno.land/std@0.75.0/fs/mod.ts"; | |
import { paramCase } from "https://deno.land/x/case@v2.1.0/mod.ts"; | |
const cwd = Deno.cwd(); | |
// Files to be excluded during the walk | |
const skip = (await Deno.readTextFile(path.join(cwd, ".gitignore"))) | |
.replace(/#.*/g, "") | |
.replace(/\s*\n/g, "\n") |
A simple JavaScript utility for conditionally joining classNames together (using on classnames), but avoiding collisions on tailwind utilities. The right-most utility takes precedence over previous of the same property (eg.: border my-1 m-2
-> border m-1
). This utility was inspired this tweet and it's under discussion on this thread
Here's a good example, given a component such as:
const SomeComponent = ({ className }) =>