Skip to content

Commit

Permalink
Merge pull request #270 from prettier/fix-ecma-version
Browse files Browse the repository at this point in the history
Fix ECMA version in internal ESLint config
  • Loading branch information
lydell committed Dec 2, 2023
2 parents f5530d3 + c8e1f17 commit bebd55e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
11 changes: 5 additions & 6 deletions .eslintrc.base.js
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -84,6 +79,10 @@ module.exports = {
"@typescript-eslint/indent": "error",
},
},
{
files: ["test-lint/{react,flowtype}.js"],
parserOptions: { parser: "@babel/eslint-parser" },
},
],
settings: {
react: {
Expand Down
2 changes: 0 additions & 2 deletions eslint.base.config.js
Expand Up @@ -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");
Expand Down Expand Up @@ -65,7 +64,6 @@ module.exports = [
...globals.es6,
...globals.node,
},
parser: babelParser,
},
rules: eslintrcBase.rules,
settings: eslintrcBase.settings,
Expand Down
2 changes: 1 addition & 1 deletion test-lint/unicorn.js
Expand Up @@ -8,4 +8,4 @@
// Prettier wants line break in `try`, but
// `plugin:unicorn/recommended` wants whitespace removed.
try {
} catch {}
} catch (_error) {}

0 comments on commit bebd55e

Please sign in to comment.