Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Nov 9, 2019
1 parent 3a94fe5 commit 4e4a54a
Show file tree
Hide file tree
Showing 14 changed files with 1,137 additions and 355 deletions.
3 changes: 1 addition & 2 deletions lib/cli.js
@@ -1,6 +1,7 @@
/* @flow */
'use strict';

const chalk = require('chalk');
const checkInvalidCLIOptions = require('./utils/checkInvalidCLIOptions');
const disableOptionsReportStringFormatter = require('./formatters/disableOptionsReportStringFormatter');
const dynamicRequire = require('./dynamicRequire');
Expand All @@ -14,8 +15,6 @@ const printConfig = require('./printConfig');
const resolveFrom = require('resolve-from');
const standalone = require('./standalone');
const writeOutputFile = require('./writeOutputFile');
// $FlowFixMe default export exists, please see ~/node_modules/chalk/index.js
const { default: chalk } = require('chalk');

const EXIT_CODE_ERROR = 2;

Expand Down
2 changes: 1 addition & 1 deletion lib/createStylelint.js
Expand Up @@ -3,13 +3,13 @@

const _ = require('lodash');
const augmentConfig = require('./augmentConfig');
const cosmiconfig = require('cosmiconfig');
const createStylelintResult = require('./createStylelintResult');
const getConfigForFile = require('./getConfigForFile');
const getPostcssResult = require('./getPostcssResult');
const isPathIgnored = require('./isPathIgnored');
const lintSource = require('./lintSource');
const path = require('path');
const { cosmiconfig } = require('cosmiconfig');

const IS_TEST = process.env.NODE_ENV === 'test';
const STOP_DIR = IS_TEST ? path.resolve(__dirname, '..') : undefined;
Expand Down
Expand Up @@ -10,7 +10,10 @@ describe('disableOptionsReportStringFormatter', () => {
disableOptionsReportStringFormatterTest([
{
source: 'foo',
ranges: [{ start: 1, end: 3, unusedRule: 'baz' }, { start: 7, unusedRule: 'all' }],
ranges: [
{ start: 1, end: 3, unusedRule: 'baz' },
{ start: 7, unusedRule: 'all' },
],
},
{
source: 'bar',
Expand Down
3 changes: 1 addition & 2 deletions lib/formatters/disableOptionsReportStringFormatter.js
Expand Up @@ -2,9 +2,8 @@

'use strict';

const chalk = require('chalk');
const path = require('path');
// $FlowFixMe default export exists, please see ~/node_modules/chalk/index.js
const { default: chalk } = require('chalk');

/**
* @param {string} fromValue
Expand Down
2 changes: 1 addition & 1 deletion lib/formatters/stringFormatter.js
@@ -1,11 +1,11 @@
'use strict';

const _ = require('lodash');
const chalk = require('chalk');
const path = require('path');
const stringWidth = require('string-width');
const symbols = require('log-symbols');
const utils = require('postcss-reporter/lib/util');
const { default: chalk } = require('chalk');
/** @type {import('table')} */
let table;

Expand Down
2 changes: 1 addition & 1 deletion lib/formatters/verboseFormatter.js
@@ -1,8 +1,8 @@
'use strict';

const _ = require('lodash');
const chalk = require('chalk');
const stringFormatter = require('./stringFormatter');
const { default: chalk } = require('chalk');

/**
* @param {import('stylelint').StylelintResult[]} results
Expand Down
3 changes: 2 additions & 1 deletion lib/rules/block-closing-brace-empty-line-before/index.js
Expand Up @@ -69,7 +69,8 @@ const rule = function(expectation, options, context) {
// Reverse the primary options if `after-closing-brace` is set
if (
optionsMatches(options, 'except', 'after-closing-brace') &&
(statement.type === 'atrule' && childNodeTypes.indexOf('decl') === -1)
statement.type === 'atrule' &&
childNodeTypes.indexOf('decl') === -1
) {
return expectation === 'never' ? true : false;
}
Expand Down
5 changes: 4 additions & 1 deletion lib/standalone.js
Expand Up @@ -201,7 +201,10 @@ module.exports = function(
return globby(fileList, globbyOptions)
.then((filePaths) => {
// The ignorer filter needs to check paths relative to cwd
filePaths = filterFilePaths(ignorer, filePaths.map((p) => path.relative(process.cwd(), p)));
filePaths = filterFilePaths(
ignorer,
filePaths.map((p) => path.relative(process.cwd(), p)),
);

if (!filePaths.length) {
if (!allowEmptyInput) {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/__tests__/checkInvalidCLIOptions.test.js
@@ -1,8 +1,8 @@
'use strict';

const chalk = require('chalk');
const checkInvalidCLIOptions = require('../checkInvalidCLIOptions');
const EOL = require('os').EOL;
const { default: chalk } = require('chalk');

describe('checkInvalidCLIOptions', () => {
const allowedOptions = {
Expand Down
10 changes: 8 additions & 2 deletions lib/utils/__tests__/report.test.js
Expand Up @@ -120,7 +120,10 @@ it('with relevant general disabledRange, among others', () => {
warn: jest.fn(),
stylelint: {
disabledRanges: {
all: [{ start: 1, end: 3 }, { start: 5, end: 8 }],
all: [
{ start: 1, end: 3 },
{ start: 5, end: 8 },
],
},
},
},
Expand All @@ -142,7 +145,10 @@ it('with relevant rule-specific disabledRange, among others', () => {
stylelint: {
disabledRanges: {
all: [],
foo: [{ start: 1, end: 3, rules: ['foo'] }, { start: 5, end: 8, rules: ['foo'] }],
foo: [
{ start: 1, end: 3, rules: ['foo'] },
{ start: 5, end: 8, rules: ['foo'] },
],
},
},
},
Expand Down
3 changes: 1 addition & 2 deletions lib/utils/checkInvalidCLIOptions.js
Expand Up @@ -2,10 +2,9 @@
'use strict';

const _ = require('lodash');
const chalk = require('chalk');
const EOL = require('os').EOL;
const leven = require('leven');
// $FlowFixMe default export exists, please see ~/node_modules/chalk/index.js
const { default: chalk } = require('chalk');

/*:: type allowedOptionsType = { [key: string]: { alias?: string } }*/

Expand Down
2 changes: 1 addition & 1 deletion lib/writeOutputFile.js
Expand Up @@ -2,8 +2,8 @@
'use strict';

const path = require('path');
const stripAnsi = require('strip-ansi');
const writeFileAtomic = require('write-file-atomic');
const { default: stripAnsi } = require('strip-ansi');

/**
* @param {string} content
Expand Down

0 comments on commit 4e4a54a

Please sign in to comment.