diff --git a/.eslintrc.base.js b/.eslintrc.base.js index 0efd2b1..e642e0b 100644 --- a/.eslintrc.base.js +++ b/.eslintrc.base.js @@ -25,14 +25,8 @@ module.exports = { ), ], parserOptions: { - parser: "@babel/eslint-parser", ecmaVersion: 2018, sourceType: "script", - // Needed for the lint-verify-fail.test.js test. - loggerFn: () => {}, - ecmaFeatures: { - jsx: true, - }, }, env: { es6: true, @@ -66,6 +60,7 @@ module.exports = { "unicorn/prefer-flat-map": "off", "unicorn/prefer-module": "off", "unicorn/prefer-node-protocol": "off", + "unicorn/prefer-optional-catch-binding": "off", "unicorn/prefer-spread": "off", "unicorn/prefer-top-level-await": "off", "unicorn/prevent-abbreviations": "off", @@ -84,6 +79,10 @@ module.exports = { "@typescript-eslint/indent": "error", }, }, + { + files: ["test-lint/{react,flowtype}.js"], + parserOptions: { parser: "@babel/eslint-parser" }, + }, ], settings: { react: { diff --git a/eslint.base.config.js b/eslint.base.config.js index b9c25e8..1dd2330 100644 --- a/eslint.base.config.js +++ b/eslint.base.config.js @@ -9,7 +9,6 @@ const fs = require("fs"); const path = require("path"); const babelOld = require("eslint-plugin-babel"); const babelNew = require("@babel/eslint-plugin"); -const babelParser = require("@babel/eslint-parser"); const flowtype = require("eslint-plugin-flowtype"); const globals = require("globals"); const google = require("eslint-config-google"); @@ -65,7 +64,6 @@ module.exports = [ ...globals.es6, ...globals.node, }, - parser: babelParser, }, rules: eslintrcBase.rules, settings: eslintrcBase.settings, diff --git a/test-lint/unicorn.js b/test-lint/unicorn.js index 7e19b33..94d831e 100644 --- a/test-lint/unicorn.js +++ b/test-lint/unicorn.js @@ -8,4 +8,4 @@ // Prettier wants line break in `try`, but // `plugin:unicorn/recommended` wants whitespace removed. try { -} catch {} +} catch (_error) {}