Make generated parsers use strict mode
* Issue #324 * JSHint complains about two possible strict violations. But are valid uses of `this`, so we suppress the warnings.
This commit is contained in:
parent
7285ccfd4e
commit
45e39c3ac8
31
.jshintrc
31
.jshintrc
|
@ -1,17 +1,18 @@
|
|||
{
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"evil": true,
|
||||
"forin": true,
|
||||
"freeze": true,
|
||||
"immed": true,
|
||||
"latedef": "nofunc",
|
||||
"laxbreak": true,
|
||||
"loopfunc": true,
|
||||
"newcap": false,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"trailing": true,
|
||||
"-W082": false
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"evil": true,
|
||||
"forin": true,
|
||||
"freeze": true,
|
||||
"immed": true,
|
||||
"latedef": "nofunc",
|
||||
"laxbreak": true,
|
||||
"loopfunc": true,
|
||||
"newcap": false,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"trailing": true,
|
||||
"validthis": true,
|
||||
"-W082": false
|
||||
}
|
||||
|
|
|
@ -761,6 +761,8 @@ function generateJavascript(ast, options) {
|
|||
|
||||
parts.push([
|
||||
'(function() {',
|
||||
' "use strict";',
|
||||
'',
|
||||
' /*',
|
||||
' * Generated by PEG.js 0.8.0.',
|
||||
' *',
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
module.exports = (function() {
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Generated by PEG.js 0.8.0.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue