Skip to content

Commit

Permalink
Revert "Correctly use ignores config, Lint xo with xo (xojs#584)"
Browse files Browse the repository at this point in the history
This reverts commit 48baacc.
  • Loading branch information
devinrhode2 committed Oct 15, 2021
1 parent 823884c commit 22177d1
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 71 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
getIgnores,
mergeWithFileConfig,
buildConfig,
mergeOptions,
} from './lib/options-manager.js';

/** Merge multiple reports into a single report */
Expand Down Expand Up @@ -151,7 +152,7 @@ const lintFiles = async (patterns, inputOptions = {}) => {
inputOptions = normalizeOptions(inputOptions);
inputOptions.cwd = path.resolve(inputOptions.cwd || process.cwd());

const files = await globFiles(patterns, mergeWithFileConfig(inputOptions).options);
const files = await globFiles(patterns, mergeOptions(inputOptions));

const reports = await pMap(
files,
Expand Down
7 changes: 3 additions & 4 deletions lib/options-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,13 +535,12 @@ const gatherImportResolvers = options => {
};

export {
findApplicableOverrides,
mergeWithPrettierConfig,
normalizeOptions,
getIgnores,
mergeWithFileConfig,
buildConfig,

// For tests
applyOverrides,
findApplicableOverrides,
mergeWithPrettierConfig,
mergeOptions,
};
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"node": ">=12.20"
},
"scripts": {
"test": "node cli.js && nyc ava"
"test": "eslint --quiet . --ext .js,.cjs && nyc ava"
},
"files": [
"config",
Expand Down Expand Up @@ -104,13 +104,18 @@
"temp-write": "^5.0.0",
"webpack": "^5.56.0"
},
"xo": {
"ignores": [
"test/fixtures",
"test/temp",
"coverage"
"eslintConfig": {
"extends": [
"eslint-config-xo",
"./config/plugins.cjs",
"./config/overrides.cjs"
]
},
"eslintIgnore": [
"test/fixtures",
"test/temp",
"coverage"
],
"ava": {
"files": [
"!test/temp"
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/nested-ignores/a.js

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/nested-ignores/b.js

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/nested-ignores/child/a.js

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/nested-ignores/child/b.js

This file was deleted.

8 changes: 0 additions & 8 deletions test/fixtures/nested-ignores/child/package.json

This file was deleted.

8 changes: 0 additions & 8 deletions test/fixtures/nested-ignores/package.json

This file was deleted.

40 changes: 0 additions & 40 deletions test/ignores.js

This file was deleted.

0 comments on commit 22177d1

Please sign in to comment.