eslint-plugin-prettier
Advanced tools
Comparing version 3.4.0 to 3.4.1
# Changelog | ||
## v3.4.1 (2021-08-20) | ||
* build(deps): Bump glob-parent from 5.0.0 to 5.1.2 ([#420](git@github.com:prettier/eslint-plugin-prettier/issues/420)) ([b6d075c](git@github.com:prettier/eslint-plugin-prettier/commit/b6d075cf7111468e8af4161c306c7f37f09f220e)) | ||
* build(deps): Bump path-parse from 1.0.6 to 1.0.7 ([#425](git@github.com:prettier/eslint-plugin-prettier/issues/425)) ([24f957e](git@github.com:prettier/eslint-plugin-prettier/commit/24f957ee2a5476bb9cc8e64921b9841fc751391e)) | ||
* feat: support `@graphql-eslint/eslint-plugin` out of box ([#413](git@github.com:prettier/eslint-plugin-prettier/issues/413)) ([ec6fbb1](git@github.com:prettier/eslint-plugin-prettier/commit/ec6fbb159e2454c6e145db55480932dc953cf7c1)) | ||
* chore: add tests for Node 16 ([#410](git@github.com:prettier/eslint-plugin-prettier/issues/410)) ([76bd45e](git@github.com:prettier/eslint-plugin-prettier/commit/76bd45ece6d56eb52f75db6b4a1efdd2efb56392)) | ||
## v3.4.0 (2021-04-15) | ||
@@ -4,0 +11,0 @@ |
@@ -168,3 +168,3 @@ /** | ||
const prettierFileInfo = prettier.getFileInfo.sync( | ||
const { ignored, inferredParser } = prettier.getFileInfo.sync( | ||
onDiskFilepath, | ||
@@ -179,3 +179,3 @@ Object.assign( | ||
// Skip if file is ignored using a .prettierignore file | ||
if (prettierFileInfo.ignored) { | ||
if (ignored) { | ||
return; | ||
@@ -211,7 +211,17 @@ } | ||
// from the file type. | ||
const parserBlocklist = [null, 'graphql', 'markdown', 'html']; | ||
const parserBlocklist = [null, 'markdown', 'html']; | ||
let inferParserToBabel = | ||
parserBlocklist.indexOf(inferredParser) !== -1; | ||
if ( | ||
filepath === onDiskFilepath && | ||
parserBlocklist.indexOf(prettierFileInfo.inferredParser) !== -1 | ||
// it could be processed by `@graphql-eslint/eslint-plugin` or `eslint-plugin-graphql` | ||
inferredParser === 'graphql' && | ||
// for `eslint-plugin-graphql`, see https://github.com/apollographql/eslint-plugin-graphql/blob/master/src/index.js#L416 | ||
source.startsWith('ESLintPluginGraphQLFile`') | ||
) { | ||
inferParserToBabel = true; | ||
} | ||
if (filepath === onDiskFilepath && inferParserToBabel) { | ||
// Prettier v1.16.0 renamed the `babylon` parser to `babel` | ||
@@ -218,0 +228,0 @@ // Use the modern name if available |
{ | ||
"name": "eslint-plugin-prettier", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "Runs prettier as an eslint rule", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52515
253