pegjs/lib
David Majda 5dd8e797f7 Code style: Do not lint lib/parser.js
The idea behind linting lib/parser.js was that it would improve quality
of code generated by PEG.js in general. However, there is a couple of
problems with it:

  1. Code in lib/parser.js is ES5 while the rest of the code is ES2015.
     This would mean a separate ESLint configuration and a separate set
     of code style rules just for lib/parser.js once code style checks
     are added.

  2. Code in lib/parser.js is generated. This means that even today it
     violates checks like "no-unused-var", which have to be disabled.
     This would get worse once code style checks are added, again
     requiring a separate ESLint configuration just for lib/parser.js.

  3. Linting lib/parser.js checks only small portion of possible code
     generator output. For example, code generated when optimizing for
     size or when tracing is not checked at all. Thus, linting
     lib/parser.js gives a false sense of security.

Because of these problems I decided not to lint lib/parser.js at all and
rely on ad-hoc linting of parser files produced by PEG.js with ignoring
false-positives. I consider this more of a pragmatic cost vs. benefits
decision than a principial one.

Part of #407.
2016-10-07 16:47:08 +02:00
..
compiler Replace stray "var" by "let" 2016-10-05 10:08:17 +02:00
.eslintrc.json ESLint: Set environments better 2016-01-29 14:50:38 +01:00
grammar-error.js Use only "//" comments 2016-09-20 15:07:39 +02:00
parser.js Code style: Do not lint lib/parser.js 2016-10-07 16:47:08 +02:00
peg.js Improve indentation of variable declarations 2016-10-04 11:30:52 +02:00