From 29f48814c087556fe1579274cd2bc1177b7f5ab4 Mon Sep 17 00:00:00 2001 From: Dane Thurber Date: Wed, 24 Oct 2018 14:00:52 -0600 Subject: [PATCH] fix: fix eslint config --- .eslintrc.js | 2 +- commitlint.config.js | 3 ++- packages/button/.storybook/config.js | 2 -- packages/button/src/react/__specs__/storyshots.spec.js | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7f172952fb..e07af6c708 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,7 +8,7 @@ module.exports = { { files: ['*.spec.js', '*.story.js'], rules: { - 'no-unused-vars': 'warning' + 'no-unused-vars': [1] } } ] diff --git a/commitlint.config.js b/commitlint.config.js index 2350c71026..e7d3f78dd1 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,7 +1,7 @@ const Repository = require('lerna/lib/Repository') const PackageUtilities = require('lerna/lib/PackageUtilities') -function getPackageAbbreviations() { +function getPackageAbbreviations () { const prefix = `ps-design-system-` const cwd = process.cwd() const repo = new Repository(cwd) @@ -13,6 +13,7 @@ function getPackageAbbreviations() { .map(pkg => pkg.name) .map(name => (name.charAt(0) === '@' ? name.split('/')[1] : name)) .map(name => (name.includes(prefix) ? name.replace(prefix, '') : name)) + .concat(['project']) } module.exports = { diff --git a/packages/button/.storybook/config.js b/packages/button/.storybook/config.js index 178dfaf4f1..327ab3e6b2 100644 --- a/packages/button/.storybook/config.js +++ b/packages/button/.storybook/config.js @@ -1,5 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ - import addons from '@storybook/addons' import { addDecorator, configure } from '@storybook/react' diff --git a/packages/button/src/react/__specs__/storyshots.spec.js b/packages/button/src/react/__specs__/storyshots.spec.js index 687de64003..e2b4f71cdd 100644 --- a/packages/button/src/react/__specs__/storyshots.spec.js +++ b/packages/button/src/react/__specs__/storyshots.spec.js @@ -1,6 +1,5 @@ -jest.mock('@pluralsight/ps-design-system-storybook-addon-center') - -import React from 'react' import initStoryshots from '@storybook/addon-storyshots' +jest.mock('@pluralsight/ps-design-system-storybook-addon-center') + initStoryshots()