Skip to content

Commit

Permalink
ESLint plugin: Enable wp global by default in the recommended config
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Aug 5, 2019
1 parent e0d2f4e commit 5d78e9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ module.exports = {
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:jest/recommended',
],
globals: {
wp: 'off',
},
rules: {
'@wordpress/react-no-unsafe-timeout': 'error',
'no-restricted-syntax': [
Expand Down Expand Up @@ -112,9 +115,9 @@ module.exports = {
browser: true,
},
globals: {
browser: true,
page: true,
wp: true,
browser: 'readonly',
page: 'readonly',
wp: 'readonly',
},
},
],
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### New Features

- New Rule: [`@wordpress/no-unguarded-get-range-at`](https://github.com/WordPress/gutenberg/blob/master/packages/eslint-plugin/docs/rules/no-unguarded-get-range-at.md)
- Enable `wp` global by default in the `recommended` config.

## 2.4.0 (2019-08-05)

Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ module.exports = {
globals: {
window: true,
document: true,
wp: 'readonly',
},
};

0 comments on commit 5d78e9b

Please sign in to comment.