@@ -9,7 +9,7 @@ const has = require('object.hasown/polyfill')();
9
9
const docsUrl = require ( '../util/docsUrl' ) ;
10
10
const jsxUtil = require ( '../util/jsx' ) ;
11
11
const reportC = require ( '../util/report' ) ;
12
- const isParenthesised = require ( '../util/ast' ) . isParenthesised ;
12
+ const isParenthesized = require ( '../util/ast' ) . isParenthesized ;
13
13
14
14
// ------------------------------------------------------------------------------
15
15
// Constants
@@ -93,7 +93,7 @@ module.exports = {
93
93
function needsOpeningNewLine ( node ) {
94
94
const previousToken = context . getSourceCode ( ) . getTokenBefore ( node ) ;
95
95
96
- if ( ! isParenthesised ( context , node ) ) {
96
+ if ( ! isParenthesized ( context , node ) ) {
97
97
return false ;
98
98
}
99
99
@@ -107,7 +107,7 @@ module.exports = {
107
107
function needsClosingNewLine ( node ) {
108
108
const nextToken = context . getSourceCode ( ) . getTokenAfter ( node ) ;
109
109
110
- if ( ! isParenthesised ( context , node ) ) {
110
+ if ( ! isParenthesized ( context , node ) ) {
111
111
return false ;
112
112
}
113
113
@@ -144,12 +144,12 @@ module.exports = {
144
144
const sourceCode = context . getSourceCode ( ) ;
145
145
const option = getOption ( type ) ;
146
146
147
- if ( ( option === true || option === 'parens' ) && ! isParenthesised ( context , node ) && isMultilines ( node ) ) {
147
+ if ( ( option === true || option === 'parens' ) && ! isParenthesized ( context , node ) && isMultilines ( node ) ) {
148
148
report ( node , 'missingParens' , ( fixer ) => fixer . replaceText ( node , `(${ sourceCode . getText ( node ) } )` ) ) ;
149
149
}
150
150
151
151
if ( option === 'parens-new-line' && isMultilines ( node ) ) {
152
- if ( ! isParenthesised ( context , node ) ) {
152
+ if ( ! isParenthesized ( context , node ) ) {
153
153
const tokenBefore = sourceCode . getTokenBefore ( node , { includeComments : true } ) ;
154
154
const tokenAfter = sourceCode . getTokenAfter ( node , { includeComments : true } ) ;
155
155
const start = node . loc . start ;
0 commit comments