Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
scripts: Instruct ESLint to avoid config discovery in defaulting
  • Loading branch information
aduth committed Jan 24, 2019
commit 167b7927934e6303c086253a7e9eba852a1cafb5
2 changes: 1 addition & 1 deletion packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

### Bug Fix

- Add missing `root` flag in the default Eslint config ([#13483](https://github.com/WordPress/gutenberg/pull/13483))
- Avoid inheriting from ESLint configurations in ancestor directories when using the default configuration ([#13483](https://github.com/WordPress/gutenberg/pull/13483))

## 2.5.0 (2019-01-09)

Expand Down
5 changes: 4 additions & 1 deletion packages/scripts/scripts/lint-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ const hasLintConfig = hasCliArg( '-c' ) ||
hasProjectFile( '.eslintrc' ) ||
hasPackageProp( 'eslintConfig' );

// When a configuration is not provided by the project, use from the default
// provided with the scripts module. Instruct ESLint to avoid discovering via
// the `--no-eslintrc` flag, as otherwise it will still merge with inherited.
const config = ! hasLintConfig ?
[ '--config', fromConfigRoot( '.eslintrc.js' ) ] :
[ '--no-eslintrc', '--config', fromConfigRoot( '.eslintrc.js' ) ] :
[];

const result = spawn(
Expand Down