Skip to content

Commit

Permalink
Update dependencies and fix unit tests (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg authored and sindresorhus committed Jul 24, 2018
1 parent 404d81b commit e783704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -53,14 +53,14 @@
"dependencies": {
"arrify": "^1.0.1",
"debug": "^3.1.0",
"eslint": "^5.0.0",
"eslint": "^5.2.0",
"eslint-config-prettier": "^2.9.0",
"eslint-config-xo": "^0.23.0",
"eslint-formatter-pretty": "^1.3.0",
"eslint-plugin-ava": "^4.5.0",
"eslint-plugin-ava": "^5.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-no-use-extend-native": "^0.3.12",
"eslint-plugin-node": "^6.0.0",
"eslint-plugin-node": "^7.0.0",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-unicorn": "^4.0.3",
Expand Down
6 changes: 3 additions & 3 deletions test/lint-text.js
Expand Up @@ -110,21 +110,21 @@ test('extends support with `esnext` option', t => {
});

test('disable style rules when `prettier` option is enabled', t => {
const withoutPrettier = fn.lintText('(a) => {}\n', {}).results;
const withoutPrettier = fn.lintText('(a) => {}\n', {filename: 'test.js'}).results;
// `arrow-parens` is enabled
t.true(hasRule(withoutPrettier, 'arrow-parens'));
// `prettier/prettier` is disabled
t.false(hasRule(withoutPrettier, 'prettier/prettier'));

const withPrettier = fn.lintText('(a) => {}\n', {prettier: true}).results;
const withPrettier = fn.lintText('(a) => {}\n', {prettier: true, filename: 'test.js'}).results;
// `arrow-parens` is disabled by `eslint-config-prettier`
t.false(hasRule(withPrettier, 'arrow-parens'));
// `prettier/prettier` is enabled
t.true(hasRule(withPrettier, 'prettier/prettier'));
});

test('extends `react` support with `prettier` option', t => {
const {results} = fn.lintText('<Hello name={ firstname } />;\n', {extends: 'xo-react', prettier: true});
const {results} = fn.lintText('<Hello name={ firstname } />;\n', {extends: 'xo-react', prettier: true, filename: 'test.jsx'});
// `react/jsx-curly-spacing` is disabled by `eslint-config-prettier`
t.false(hasRule(results, 'react/jsx-curly-spacing'));
// `prettier/prettier` is enabled
Expand Down

0 comments on commit e783704

Please sign in to comment.