Enable the ESLint grouped-accessor-pairs rule

This rule complements the existing `accessor-pairs` nicely, and ensures that a getter/setter pair is always consistently ordered.

Please find additional details about this rule at https://eslint.org/docs/rules/grouped-accessor-pairs
This commit is contained in:
Jonas Jenwald 2020-05-07 11:43:19 +02:00
parent 491904d30a
commit 744af9eeb8
3 changed files with 9 additions and 8 deletions

View File

@ -77,6 +77,7 @@
"curly": ["error", "all"],
"dot-notation": "error",
"eqeqeq": ["error", "always"],
"grouped-accessor-pairs": ["error", "getBeforeSet"],
"no-caller": "error",
"no-else-return": "error",
"no-empty-pattern": "error",

View File

@ -312,14 +312,14 @@ var PDFViewerApplication = {
return this.pdfDocument.numPages;
},
set page(val) {
this.pdfViewer.currentPageNumber = val;
},
get page() {
return this.pdfViewer.currentPageNumber;
},
set page(val) {
this.pdfViewer.currentPageNumber = val;
},
zoomIn: function pdfViewZoomIn(ticks) {
var newScale = this.pdfViewer.currentScale;
do {

View File

@ -531,14 +531,14 @@ const PDFViewerApplication = {
return this.pdfDocument ? this.pdfDocument.numPages : 0;
},
set page(val) {
this.pdfViewer.currentPageNumber = val;
},
get page() {
return this.pdfViewer.currentPageNumber;
},
set page(val) {
this.pdfViewer.currentPageNumber = val;
},
get printing() {
return !!this.printService;
},