build: Disable some eslint rules in /bin

This commit is contained in:
Cole Bemis 2018-05-17 22:21:17 -07:00
parent 23b17b9c55
commit 76f29d8565
8 changed files with 13 additions and 7 deletions

6
bin/.eslintrc.json Normal file
View File

@ -0,0 +1,6 @@
{
"rules": {
"import/no-extraneous-dependencies": "off",
"no-console": "off"
}
}

View File

@ -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)

View File

@ -1,4 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
import path from 'path';
import cheerio from 'cheerio';
import { minify } from 'html-minifier';

View File

@ -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));

View File

@ -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();

View File

@ -1,4 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
import Svgo from 'svgo';
import cheerio from 'cheerio';
import { format } from 'prettier';

View File

@ -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)

View File

@ -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() {