Skip to content

Commit

Permalink
fix(#214): update private prettier path
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Nov 23, 2020
1 parent 2b34d45 commit a141e7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rules/decorator-position.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ function lineLength(userOptions, filePath) {

if (!('printWidth' in prettierOptions)) {
// available at prettier/src/main/core-options
const defaultPrintWidth = prettier.__internal.options.printWidth.default;
// keep an eye on this. There may have been an issue with prettier 2.2.0
// but I've been unable to get the tests to pass prior to this change with *any*
// prettier version (issue-reproduction/196 reproduces issue #214)
const defaultPrintWidth = prettier.__internal.coreOptions.options.printWidth.default;
return { ...prettierOptions, ...userOptions, printWidth: defaultPrintWidth };
}

Expand Down
3 changes: 3 additions & 0 deletions scripts/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ config_path=".eslintrc.js"
yarn
yarn link $name

yarn list eslint
yarn list prettier

# ls -la node_modules/$name

yarn eslint \
Expand Down

0 comments on commit a141e7a

Please sign in to comment.