From 76f29d8565ea30d6d6ead053847512f8c2d76953 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Thu, 17 May 2018 22:21:17 -0700 Subject: [PATCH] build: Disable some eslint rules in /bin --- bin/.eslintrc.json | 6 ++++++ bin/build-icons-json.js | 2 +- bin/build-icons-object.js | 1 - bin/build-sprite.js | 2 +- bin/build-svgs.js | 2 +- bin/process-svg.js | 1 - bin/process-svgs.js | 2 +- bin/sync-algolia.js | 4 +++- 8 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 bin/.eslintrc.json diff --git a/bin/.eslintrc.json b/bin/.eslintrc.json new file mode 100644 index 0000000..3394463 --- /dev/null +++ b/bin/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + "import/no-extraneous-dependencies": "off", + "no-console": "off" + } +} diff --git a/bin/build-icons-json.js b/bin/build-icons-json.js index 8a549b8..0e96605 100644 --- a/bin/build-icons-json.js +++ b/bin/build-icons-json.js @@ -6,7 +6,7 @@ import buildIconsObject from './build-icons-object'; const IN_DIR = path.resolve(__dirname, '../icons'); const OUT_FILE = path.resolve(__dirname, '../dist/icons.json'); -console.log(`Building ${OUT_FILE}`); // eslint-disable-line no-console +console.log(`Building ${OUT_FILE}`); const svgFiles = fs .readdirSync(IN_DIR) diff --git a/bin/build-icons-object.js b/bin/build-icons-object.js index 3455cd0..32533eb 100644 --- a/bin/build-icons-object.js +++ b/bin/build-icons-object.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import path from 'path'; import cheerio from 'cheerio'; import { minify } from 'html-minifier'; diff --git a/bin/build-sprite.js b/bin/build-sprite.js index 1207b77..603b072 100644 --- a/bin/build-sprite.js +++ b/bin/build-sprite.js @@ -5,6 +5,6 @@ import buildSpriteString from './build-sprite-string'; const OUT_FILE = path.resolve(__dirname, '../dist/feather-sprite.svg'); -console.log(`Building ${OUT_FILE}`); // eslint-disable-line no-console +console.log(`Building ${OUT_FILE}`); fs.writeFileSync(OUT_FILE, buildSpriteString(icons)); diff --git a/bin/build-svgs.js b/bin/build-svgs.js index 1ae31d0..42a3d76 100644 --- a/bin/build-svgs.js +++ b/bin/build-svgs.js @@ -4,7 +4,7 @@ import icons from '../src/icons'; const OUT_DIR = path.resolve(__dirname, '../dist/icons'); -console.log(`Building SVGs in ${OUT_DIR}`); // eslint-disable-line no-console +console.log(`Building SVGs in ${OUT_DIR}`); Object.keys(icons).forEach(name => { const svg = icons[name].toSvg(); diff --git a/bin/process-svg.js b/bin/process-svg.js index a85e92e..44d3ec6 100644 --- a/bin/process-svg.js +++ b/bin/process-svg.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import Svgo from 'svgo'; import cheerio from 'cheerio'; import { format } from 'prettier'; diff --git a/bin/process-svgs.js b/bin/process-svgs.js index 721d2a0..6d056c7 100644 --- a/bin/process-svgs.js +++ b/bin/process-svgs.js @@ -5,7 +5,7 @@ import processSvg from './process-svg'; const IN_DIR = path.resolve(__dirname, '../icons'); -console.log(`Processing SVGs in ${IN_DIR}`); // eslint-disable-line no-console +console.log(`Processing SVGs in ${IN_DIR}`); fs .readdirSync(IN_DIR) diff --git a/bin/sync-algolia.js b/bin/sync-algolia.js index 8cb090a..739cb8f 100644 --- a/bin/sync-algolia.js +++ b/bin/sync-algolia.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import algolia from 'algoliasearch'; import icons from '../dist/icons.json'; import tags from '../src/tags.json'; @@ -9,7 +8,10 @@ if ( process.env.TRAVIS_PULL_REQUEST === 'false' && process.env.TRAVIS_BRANCH === 'master' ) { + console.log('Syncing Algolia records'); syncAlgolia(); +} else { + console.log('Skipped Algolia sync'); } function syncAlgolia() {