Skip to content

Commit 333ab65

Browse files
author
Roy Sutton
committed
Remove references to fix
1 parent 01238e9 commit 333ab65

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

lib/rules/sort-prop-types.js

+3-19
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const variableUtil = require('../util/variable');
88
const propsUtil = require('../util/props');
99
const docsUrl = require('../util/docsUrl');
1010
const propWrapperUtil = require('../util/propWrapper');
11-
const propTypesSortUtil = require('../util/propTypesSort');
1211

1312
// ------------------------------------------------------------------------------
1413
// Rule Definition
@@ -96,18 +95,6 @@ module.exports = {
9695
return;
9796
}
9897

99-
function fix(fixer) {
100-
return propTypesSortUtil.fixPropTypesSort(
101-
fixer,
102-
context,
103-
declarations,
104-
ignoreCase,
105-
requiredFirst,
106-
callbacksLast,
107-
sortShapeProp
108-
);
109-
}
110-
11198
declarations.reduce((prev, curr, idx, decls) => {
11299
if (curr.type === 'ExperimentalSpreadProperty' || curr.type === 'SpreadElement') {
113100
return decls[idx + 1];
@@ -134,8 +121,7 @@ module.exports = {
134121
// Encountered a non-required prop after a required prop
135122
context.report({
136123
node: curr,
137-
message: 'Required prop types must be listed before all other prop types',
138-
fix
124+
message: 'Required prop types must be listed before all other prop types'
139125
});
140126
return curr;
141127
}
@@ -150,8 +136,7 @@ module.exports = {
150136
// Encountered a non-callback prop after a callback prop
151137
context.report({
152138
node: prev,
153-
message: 'Callback prop types must be listed after all other prop types',
154-
fix
139+
message: 'Callback prop types must be listed after all other prop types'
155140
});
156141
return prev;
157142
}
@@ -160,8 +145,7 @@ module.exports = {
160145
if (!noSortAlphabetically && currentPropName < prevPropName) {
161146
context.report({
162147
node: curr,
163-
message: 'Prop types declarations should be sorted alphabetically',
164-
fix
148+
message: 'Prop types declarations should be sorted alphabetically'
165149
});
166150
return prev;
167151
}

0 commit comments

Comments
 (0)