Enable the no-var
ESLint rule in the /web
folder
https://eslint.org/docs/rules/no-var Please note that two files were excluded: 1. `web/debugger.js`, since there's code in other files that currently depend on the global availability of code in `web/debugger.js`. Furthermore, since that file isn't used in production, doing a ES6 conversion probably isn't a priority. 2. `web/grab_to_pan.js`, since that file could be considered to be "external" code. We have made smaller changes to that file over the years, however doing a full ES6 `class` conversion might be a step too far!?
This commit is contained in:
parent
ad0c1fb2c0
commit
d70263ced8
@ -166,6 +166,7 @@
|
|||||||
"no-useless-computed-key": "error",
|
"no-useless-computed-key": "error",
|
||||||
"no-useless-constructor": "error",
|
"no-useless-constructor": "error",
|
||||||
"no-useless-rename": "error",
|
"no-useless-rename": "error",
|
||||||
|
"no-var": "off",
|
||||||
"object-shorthand": ["error", "always", {
|
"object-shorthand": ["error", "always", {
|
||||||
"avoidQuotes": true,
|
"avoidQuotes": true,
|
||||||
}],
|
}],
|
||||||
|
10
web/.eslintrc
Normal file
10
web/.eslintrc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
../.eslintrc
|
||||||
|
],
|
||||||
|
|
||||||
|
"rules": {
|
||||||
|
// ECMAScript 6
|
||||||
|
"no-var": "error",
|
||||||
|
},
|
||||||
|
}
|
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* eslint-disable no-var */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* eslint-disable no-var */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a GrabToPan instance for a given HTML element.
|
* Construct a GrabToPan instance for a given HTML element.
|
||||||
|
Loading…
Reference in New Issue
Block a user