diff --git a/.eslintrc.json b/.eslintrc.json index 10ebc8a..cf20cdc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,3 @@ { - "extends": "eslint:recommended", - "env": { - "node": true - } + "extends": "eslint:recommended" } diff --git a/benchmark/benchmarks.js b/benchmark/benchmarks.js index b389871..2eaff43 100644 --- a/benchmark/benchmarks.js +++ b/benchmark/benchmarks.js @@ -1,3 +1,5 @@ +/* global module */ + "use strict"; (function(root, factory) { diff --git a/benchmark/run b/benchmark/run index 37b828f..28a514f 100755 --- a/benchmark/run +++ b/benchmark/run @@ -1,5 +1,6 @@ #!/usr/bin/env node +/* eslint-env node */ /* eslint no-console: 0*/ "use strict"; diff --git a/benchmark/runner.js b/benchmark/runner.js index 4c482f8..2ec1723 100644 --- a/benchmark/runner.js +++ b/benchmark/runner.js @@ -1,3 +1,5 @@ +/* global module, setTimeout */ + "use strict"; (function(root, factory) { diff --git a/bin/.eslintrc.json b/bin/.eslintrc.json new file mode 100644 index 0000000..10d2238 --- /dev/null +++ b/bin/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "env": { + "node": true + } +} diff --git a/lib/.eslintrc.json b/lib/.eslintrc.json new file mode 100644 index 0000000..e84df8c --- /dev/null +++ b/lib/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "env": { + "commonjs": true + } +} diff --git a/spec/.eslintrc.json b/spec/.eslintrc.json new file mode 100644 index 0000000..52939e2 --- /dev/null +++ b/spec/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "env": { + "jasmine": true + } +} diff --git a/spec/api/generated-parser-api.spec.js b/spec/api/generated-parser-api.spec.js index efa03bc..0fd785a 100644 --- a/spec/api/generated-parser-api.spec.js +++ b/spec/api/generated-parser-api.spec.js @@ -1,6 +1,5 @@ -/* eslint-env jasmine */ /* eslint no-console: 0 */ -/* global PEG */ +/* global PEG, console */ "use strict"; diff --git a/spec/api/pegjs-api.spec.js b/spec/api/pegjs-api.spec.js index 9488e5f..f42d04e 100644 --- a/spec/api/pegjs-api.spec.js +++ b/spec/api/pegjs-api.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/api/plugin-api.spec.js b/spec/api/plugin-api.spec.js index d8b0f4b..59988d2 100644 --- a/spec/api/plugin-api.spec.js +++ b/spec/api/plugin-api.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/behavior/generated-parser-behavior.spec.js b/spec/behavior/generated-parser-behavior.spec.js index e2bd194..42b32dc 100644 --- a/spec/behavior/generated-parser-behavior.spec.js +++ b/spec/behavior/generated-parser-behavior.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/helpers.js b/spec/helpers.js index ed18655..74e0e8b 100644 --- a/spec/helpers.js +++ b/spec/helpers.js @@ -1,3 +1,5 @@ +/* global require */ + "use strict"; (function(root) { diff --git a/spec/unit/compiler/passes/generate-bytecode.spec.js b/spec/unit/compiler/passes/generate-bytecode.spec.js index e09fdda..de293af 100644 --- a/spec/unit/compiler/passes/generate-bytecode.spec.js +++ b/spec/unit/compiler/passes/generate-bytecode.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/unit/compiler/passes/helpers.js b/spec/unit/compiler/passes/helpers.js index 00819b2..1df6630 100644 --- a/spec/unit/compiler/passes/helpers.js +++ b/spec/unit/compiler/passes/helpers.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/unit/compiler/passes/remove-proxy-rules.spec.js b/spec/unit/compiler/passes/remove-proxy-rules.spec.js index 512b67b..aaebab7 100644 --- a/spec/unit/compiler/passes/remove-proxy-rules.spec.js +++ b/spec/unit/compiler/passes/remove-proxy-rules.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/unit/compiler/passes/report-infinite-loops.spec.js b/spec/unit/compiler/passes/report-infinite-loops.spec.js index eb3b7d8..1758b93 100644 --- a/spec/unit/compiler/passes/report-infinite-loops.spec.js +++ b/spec/unit/compiler/passes/report-infinite-loops.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/unit/compiler/passes/report-left-recursion.spec.js b/spec/unit/compiler/passes/report-left-recursion.spec.js index 6188f0e..8fd168e 100644 --- a/spec/unit/compiler/passes/report-left-recursion.spec.js +++ b/spec/unit/compiler/passes/report-left-recursion.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/unit/compiler/passes/report-missing-rules.spec.js b/spec/unit/compiler/passes/report-missing-rules.spec.js index 136fae1..5c56885 100644 --- a/spec/unit/compiler/passes/report-missing-rules.spec.js +++ b/spec/unit/compiler/passes/report-missing-rules.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict"; diff --git a/spec/unit/parser.spec.js b/spec/unit/parser.spec.js index 5fe756d..cc1d87a 100644 --- a/spec/unit/parser.spec.js +++ b/spec/unit/parser.spec.js @@ -1,4 +1,3 @@ -/* eslint-env jasmine */ /* global PEG */ "use strict";