Skip to content

Instantly share code, notes, and snippets.

View jastuccio's full-sized avatar
😊
living the dream

jastuccio jastuccio

😊
living the dream
View GitHub Profile
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "all",
"write": "src/**/*.js",
"jsxBracketSameLine": true
}
export PKG=eslint-config-airbnb;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
#Install other ESLint peer-dependancies as well as prettier:
npm install -D babel-eslint eslint-config-react eslint-config-prettier eslint-plugin-prettier prettier
{
"extends": ["airbnb", "prettier", "prettier/react"],
"rules": {
"react/jsx-filename-extension": [
"error",
{ "extensions": [".js", ".jsx"] }
],
"react/react-in-jsx-scope": 0,
"react/require-default-props": 0,
"react/forbid-prop-types": 1,
@jastuccio
jastuccio / eslint.rc
Last active September 21, 2018 09:40
leveluptutorials eslint.rc (leveluptutorials.com/tutorials/react-16-for-everyone/eslinting-react-and-why-it-matters)
{module.exports = {
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true
},
"settings": {
"ecmascript": 6,
"jsx": true
},
@jastuccio
jastuccio / .gitignore_global
Last active September 15, 2019 15:34
Global .gitignore
###############################################################
# environment variables file
###############################################################
*.env
###############################################################
# General Mac OS
###############################################################
.DS_Store
.AppleDouble
@jastuccio
jastuccio / z.md
Last active October 1, 2017 08:09 — forked from mischah/z.md
Installing und initializing z (https://github.com/rupa/z) with help of Homebrew.

#The power of z

Do you spend lots of time doing things like this?

cd this/is/the/path/that/i/want/so/i/type/it/all/out/to/get/whereiwant

With z, you could just do this:

// Type into terminal
yarn add bundle-buddy-webpack-plugin webpack-bundle-analyzer --dev
// webpack.bundlebuddy.js
const webpackBundleBuddy = require("bundle-buddy-webpack-plugin")
module.exports = {
plugins: [
new webpackBundleBuddy({sam: true})
]
@jastuccio
jastuccio / index.html
Last active December 5, 2016 00:55
JavaScript Challenge
<div>The total time of the movies is: <span id="demo"></span>
</div>
@jastuccio
jastuccio / image-attribution
Last active December 26, 2018 05:31
HTML code for image attribution in my WordPress site
<!-- Attribution-ShareAlike License -->
<small>
Feature image by<a title="image name" class="feature-image-credit" href="" target="_blank">flickr username</a>
<a title="Attribution-ShareAlike License" class="cc-license" href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank" rel="nofollow"><img src="" /></a>
</small>
<!-- public domain License -->
<img alt="" src="" title="" img="">
@jastuccio
jastuccio / roman-numeral-converter.js
Created October 18, 2016 16:39
Convert numbers into Roman Numerals using JavaScript
// use the function form of strict
function convert(num) {
var remainingValue = num;
var newRomanNumeral = "";
var romanNumerals = [{
numeral: "M",
value: 1000
}, {