Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): bump eslint-config-prettier from 8.8.0 to 9.0.0 #1240

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 1, 2023

Bumps eslint-config-prettier from 8.8.0 to 9.0.0.

Changelog

Sourced from eslint-config-prettier's changelog.

Version 9.0.0 (2023-08-05)

  • Added: The CLI helper tool now works with eslint.config.js (flat config). Just like ESLint itself, the CLI tool automatically first tries eslint.config.js and then eslintrc, and you can force which one to use by setting the [ESLINT_USE_FLAT_CONFIG] environment variable. Note that the config of eslint-config-prettier has always been compatible with eslint.config.js (flat config) – it was just the CLI tool that needed updating. On top of that, the docs have been updated to mention how to use both eslint.config.js (flat config) and eslintrc, and the tests now test both config systems.
  • Changed: [unicode-bom] is no longer turned off. Prettier preserves the BOM if you have one, and does not add one if missing. It was wrong of eslint-config-prettier to disable that rule. If you get ESLint errors after upgrading, either add "unicode-bom": "off" to your config to disable it again, or run ESLint with --fix to fix all files according to the rule (add or remove BOM). Thanks to Nicolas Stepien (@​nstepien)!

Version 8.10.0 (2023-08-03)

  • Added: [max-statements-per-line]. Thanks to @​Zamiell!

Version 8.9.0 (2023-07-27)

  • Added: [vue/array-element-newline]. Thanks to @​xcatliu!
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Sep 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Diff between eslint-config-prettier 8.8.0 and 9.0.0
diff --git a/bin/cli.js b/bin/cli.js
index v8.8.0..v9.0.0 100755
--- a/bin/cli.js
+++ b/bin/cli.js
@@ -9,8 +9,18 @@
 // Require locally installed eslint, for `npx eslint-config-prettier` support
 // with no local eslint-config-prettier installation.
-const { ESLint } = require(require.resolve("eslint", {
-  paths: [process.cwd(), ...require.resolve.paths("eslint")],
-}));
+const localRequire = (request) =>
+  require(require.resolve(request, {
+    paths: [process.cwd(), ...require.resolve.paths("eslint")],
+  }));
 
+let experimentalApi = {};
+try {
+  experimentalApi = localRequire("eslint/use-at-your-own-risk");
+  // eslint-disable-next-line unicorn/prefer-optional-catch-binding
+} catch (_error) {}
+
+const { ESLint, FlatESLint = experimentalApi.FlatESLint } =
+  localRequire("eslint");
+
 const SPECIAL_RULES_URL =
   "https://github.com/prettier/eslint-config-prettier#special-rules";
@@ -28,6 +38,25 @@
 
   const eslint = new ESLint();
+  const flatESLint = FlatESLint === undefined ? undefined : new FlatESLint();
 
-  Promise.all(args.map((file) => eslint.calculateConfigForFile(file)))
+  Promise.all(
+    args.map((file) => {
+      switch (process.env.ESLINT_USE_FLAT_CONFIG) {
+        case "true": {
+          return flatESLint.calculateConfigForFile(file);
+        }
+        case "false": {
+          return eslint.calculateConfigForFile(file);
+        }
+        default: {
+          // This turns synchronous errors (such as `.calculateConfigForFile` not existing)
+          // and turns them into promise rejections.
+          return Promise.resolve()
+            .then(() => flatESLint.calculateConfigForFile(file))
+            .catch(() => eslint.calculateConfigForFile(file));
+        }
+      }
+    })
+  )
     .then((configs) => {
       const rules = configs.flatMap(({ rules }, index) =>
diff --git a/index.js b/index.js
index v8.8.0..v9.0.0 100644
--- a/index.js
+++ b/index.js
@@ -46,4 +46,5 @@
     "keyword-spacing": "off",
     "linebreak-style": "off",
+    "max-statements-per-line": "off",
     "multiline-ternary": "off",
     "newline-per-chained-call": "off",
@@ -77,5 +78,4 @@
     "template-curly-spacing": "off",
     "template-tag-spacing": "off",
-    "unicode-bom": "off",
     "wrap-iife": "off",
     "wrap-regex": "off",
@@ -136,4 +136,5 @@
     "vue/array-bracket-newline": "off",
     "vue/array-bracket-spacing": "off",
+    "vue/array-element-newline": "off",
     "vue/arrow-spacing": "off",
     "vue/block-spacing": "off",
diff --git a/package.json b/package.json
index v8.8.0..v9.0.0 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
   "name": "eslint-config-prettier",
-  "version": "8.8.0",
+  "version": "9.0.0",
   "license": "MIT",
   "author": "Simon Lydell",
diff --git a/README.md b/README.md
index v8.8.0..v9.0.0 100644
--- a/README.md
+++ b/README.md
@@ -7,3 +7,5 @@
 Note that this config _only_ turns rules _off,_ so it only makes sense using it together with some other config.
 
+[prettier]: https://github.com/prettier/prettier
+
 **[➡️ Full readme](https://github.com/prettier/eslint-config-prettier/)**
\ No newline at end of file
Size Files
19.3 KB → 20.3 KB (+1.0 KB 🟡) 14 → 14 (±0 🟢)
Command details
npm diff --diff=eslint-config-prettier@8.8.0 --diff=eslint-config-prettier@9.0.0 --diff-unified=2

See also the npm diff document.

Reported by ybiquitous/npm-diff-action@v1.4.1 (Node.js 18.17.1 and npm 10.0.0)

Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.8.0 to 9.0.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/eslint-config-prettier@v8.8.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/eslint-config-prettier-9.0.0 branch from 32a09a9 to 45d0c4f Compare September 1, 2023 05:22
@ybiquitous ybiquitous changed the title build(deps): bump eslint-config-prettier from 8.8.0 to 9.0.0 fix(deps): bump eslint-config-prettier from 8.8.0 to 9.0.0 Sep 1, 2023
@ybiquitous ybiquitous merged commit 4f9c88c into main Sep 1, 2023
5 checks passed
@ybiquitous ybiquitous deleted the dependabot/npm_and_yarn/eslint-config-prettier-9.0.0 branch September 1, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant