diff --git a/.eslintignore b/.eslintignore index 85bc5d593..d149d0f58 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,7 +7,7 @@ external/webL10n/ external/cmapscompress/ external/builder/fixtures/ external/builder/fixtures_esprima/ -external/quickjs/quickjs-eval.js +external/quickjs/ src/shared/cffStandardStrings.js src/shared/fonts_utils.js test/tmp/ diff --git a/.eslintrc b/.eslintrc index 15643b2a5..128967483 100644 --- a/.eslintrc +++ b/.eslintrc @@ -197,7 +197,7 @@ "no-useless-computed-key": "error", "no-useless-constructor": "error", "no-useless-rename": "error", - "no-var": "off", + "no-var": "error", "object-shorthand": ["error", "always", { "avoidQuotes": true, }], diff --git a/examples/.eslintrc b/examples/.eslintrc index 14eeee2f8..433abdbfa 100644 --- a/examples/.eslintrc +++ b/examples/.eslintrc @@ -8,9 +8,4 @@ "pdfjsLib": false, "pdfjsViewer": false, }, - - "rules": { - // ECMAScript 6 - "no-var": "error", - }, } diff --git a/extensions/chromium/.eslintrc b/extensions/chromium/.eslintrc index ae23570f8..9b12e47c4 100644 --- a/extensions/chromium/.eslintrc +++ b/extensions/chromium/.eslintrc @@ -17,6 +17,7 @@ "rules": { "mozilla/import-globals": "error", + "no-var": "off", "object-shorthand": "off", }, } diff --git a/extensions/firefox/.eslintrc b/extensions/firefox/.eslintrc index ac538caa5..7c4e6e682 100644 --- a/extensions/firefox/.eslintrc +++ b/extensions/firefox/.eslintrc @@ -16,6 +16,7 @@ "rules": { // Items different from the mozilla/recommended configuration. + "no-var": "off", // Other rules mozilla/recommended hasn't enabled yet. "no-shadow": "error", diff --git a/external/.eslintrc b/external/.eslintrc index e3523dce5..64c94ad96 100644 --- a/external/.eslintrc +++ b/external/.eslintrc @@ -6,4 +6,9 @@ "env": { "node": true, }, + + "rules": { + // ECMAScript 6 + "no-var": "off", + }, } diff --git a/gulpfile.js b/gulpfile.js index 905420c33..eb515bb63 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -13,7 +13,6 @@ * limitations under the License. */ /* eslint-env node */ -/* eslint no-var: error */ /* globals target */ "use strict"; diff --git a/src/.eslintrc b/src/.eslintrc deleted file mode 100644 index 4a0b538f6..000000000 --- a/src/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "../.eslintrc" - ], - - "rules": { - // ECMAScript 6 - "no-var": "error", - }, -} diff --git a/src/core/.eslintrc b/src/core/.eslintrc index cec998b9c..c1831d388 100644 --- a/src/core/.eslintrc +++ b/src/core/.eslintrc @@ -4,7 +4,7 @@ }, "extends": [ - "../.eslintrc" + "../../.eslintrc" ], "env": { diff --git a/src/shared/.eslintrc b/src/shared/.eslintrc index cec998b9c..c1831d388 100644 --- a/src/shared/.eslintrc +++ b/src/shared/.eslintrc @@ -4,7 +4,7 @@ }, "extends": [ - "../.eslintrc" + "../../.eslintrc" ], "env": { diff --git a/systemjs.config.js b/systemjs.config.js index c5d8185aa..a4a02bc0f 100644 --- a/systemjs.config.js +++ b/systemjs.config.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ "use strict"; diff --git a/test/add_test.js b/test/add_test.js index 1f3cd55e9..ca4b4b18b 100644 --- a/test/add_test.js +++ b/test/add_test.js @@ -1,3 +1,5 @@ +/* eslint-disable no-var */ + const fs = require("fs"); const crypto = require("crypto"); const execSync = require("child_process").execSync; diff --git a/test/chromium/test-telemetry.js b/test/chromium/test-telemetry.js index c0121c5cb..f03675a50 100755 --- a/test/chromium/test-telemetry.js +++ b/test/chromium/test-telemetry.js @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ "use strict"; diff --git a/test/downloadutils.js b/test/downloadutils.js index 15c0c3c3b..159d15a21 100644 --- a/test/downloadutils.js +++ b/test/downloadutils.js @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ "use strict"; diff --git a/test/driver.js b/test/driver.js index d40062547..717b6caaa 100644 --- a/test/driver.js +++ b/test/driver.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ /* globals pdfjsLib, pdfjsViewer */ "use strict"; diff --git a/test/font/.eslintrc b/test/font/.eslintrc deleted file mode 100644 index 4a0b538f6..000000000 --- a/test/font/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "../.eslintrc" - ], - - "rules": { - // ECMAScript 6 - "no-var": "error", - }, -} diff --git a/test/stats/statcmp.js b/test/stats/statcmp.js index b0b35c93a..4dd2a44a4 100644 --- a/test/stats/statcmp.js +++ b/test/stats/statcmp.js @@ -1,3 +1,5 @@ +/* eslint-disable no-var */ + "use strict"; var fs = require("fs"); diff --git a/test/test.js b/test/test.js index 13ab5461c..957ceb69d 100644 --- a/test/test.js +++ b/test/test.js @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ "use strict"; diff --git a/test/testutils.js b/test/testutils.js index 8113d949f..f4e7eb03d 100644 --- a/test/testutils.js +++ b/test/testutils.js @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ "use strict"; diff --git a/test/unit/.eslintrc b/test/unit/.eslintrc index c78c8b2d8..69af6d92d 100644 --- a/test/unit/.eslintrc +++ b/test/unit/.eslintrc @@ -6,8 +6,5 @@ "rules": { // Plugins "import/no-unresolved": ["error", { "ignore": ["pdfjs/"] }], - - // ECMAScript 6 - "no-var": "error", }, } diff --git a/test/webserver.js b/test/webserver.js index 68b413858..c2d5b96de 100644 --- a/test/webserver.js +++ b/test/webserver.js @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ "use strict"; diff --git a/web/.eslintrc b/web/.eslintrc index 4bf1e6286..08e6f9e38 100644 --- a/web/.eslintrc +++ b/web/.eslintrc @@ -6,8 +6,5 @@ "rules": { // Plugins "import/no-unresolved": ["error", { "ignore": ["pdfjs-lib"]}], - - // ECMAScript 6 - "no-var": "error", }, }