From 4e66c83d70be09914b2cdc5daf2b8dabb3b94cac Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 11 Apr 2024 21:34:54 -0400 Subject: [PATCH] Update the eslint installation instructions to account for 9.x --- readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/readme.md b/readme.md index 0cee406..7b5400c 100644 --- a/readme.md +++ b/readme.md @@ -44,6 +44,20 @@ ln -s "$(readlink -f stylelintrc)" ~/.stylelintrc #### Install +Add this to your `~/.bashrc`: + +``` +export npm_config_prefix="$HOME/.node" +export NODE_PATH="$HOME/.node/lib/node_modules" +export ESLINT_USE_FLAT_CONFIG=false + +function eslint { + npx eslint --config ~/.eslintrc --resolve-plugins-relative-to ~/.node/lib "$@" 2>/dev/null +} +``` + +Then install with: + ``` npm install -g eslint @babel/eslint-parser eslint-plugin-vue eslint-plugin-json ```