You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-32Lines changed: 2 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -73,39 +73,9 @@ We rebase feature branches onto master when merging in order to maintain a linea
73
73
74
74
## Code Syntax & Style
75
75
76
-
We use [JSCS](https://www.npmjs.org/package/jscs) to enforce a basic set of code style guidelines, and [JSHint](http://jshint.com/) to guard against syntax errors. To run them both execute `npm run lint`; they will also be run every time you execute `npm test`.
76
+
We use [ESLint](https://eslint.org/) to enforce a basic set of code style guidelines and syntax warnings. To run ESLint use the command `npm run lint`; this command will also be run every time you execute `npm test`.
77
77
78
-
JSCS is a useful tool for enforcing a code style, but isn't flexible enough to cover all guidelines. Note our standard for spacing within function parentheses, which is not enforced mechanically but will be evaluated manually when reviewing pull requests:
79
-
80
-
```javascript
81
-
// Function params and args should be spaced out from the parentheses:
82
-
someMethodCall( param1, param2 );
83
-
functionnewFunction( arg1, arg2 ) {};
84
-
```
85
-
86
-
"When in doubt, space it out," with the following exceptions.
87
-
88
-
```javascript
89
-
// The space can be omitted when passing function expressions, object literals
90
-
// or array literals as arguments:
91
-
someMethodCall(function() {
92
-
// do stuff
93
-
});
94
-
someOtherMethod({
95
-
object:'no space before an object literal'
96
-
}, 'but this String argument still has a space after it' );
97
-
someMethodThatTakesAnArray([
98
-
'no',
99
-
'leading or trailing',
100
-
'spaces needed'
101
-
]);
102
-
```
103
-
104
-
We prefer `camelCase` variable and function names, and `UpperCamelCase` constructors. When using the `underscore_case` parameter names that are required by the WordPress API, the following JSHint directive can be used to disable the case enforcement for that particular file:
105
-
106
-
```javascript
107
-
/*jshint -W106 */// Disable underscore_case warnings in this file
108
-
```
78
+
We prefer `camelCase` variable and function names, and `UpperCamelCase` constructors. `underscore_case` parameter names may be necessary when working with values returned from or intended to be sent to the WordPress REST API.
0 commit comments