Skip to content

Instantly share code, notes, and snippets.

View obouchari's full-sized avatar
🏠
Working from home

Otman Bouchari obouchari

🏠
Working from home
View GitHub Profile
@obouchari
obouchari / .eslintrc.js
Created December 9, 2021 07:55
Basic config for ESlint and Prettier
module.exports = {
extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true,
},
rules: {
@hequ
hequ / gulpfile.js
Created April 10, 2015 11:02
Gulpfile with watch for React and Browserify
var source = require('vinyl-source-stream'),
gulp = require('gulp'),
browserify = require('browserify'),
reactify = require('reactify'),
notify = require('gulp-notify');
var sourcesDir = './ui/jsx',
appEntryPoint = "app.js",
targetDir = './src/main/webapp';
@branneman
branneman / better-nodejs-require-paths.md
Last active April 25, 2024 13:21
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions