Skip to content

Commit 0b1616c

Browse files
cjihrigcodebytere
authored andcommitted
tools: add meta.fixable to fixable lint rules
This commit adds the meta.fixable property to all fixable ESLint rules. This is required as of ESLint 7.6.0. PR-URL: #34589 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent e9aebc3 commit 0b1616c

7 files changed

+27
-0
lines changed

tools/eslint-rules/crypto-check.js

+4
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,7 @@ module.exports = function(context) {
120120
'Program:exit': () => reportIfMissingCheck()
121121
};
122122
};
123+
124+
module.exports.meta = {
125+
fixable: 'code'
126+
};

tools/eslint-rules/eslint-check.js

+4
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,7 @@ module.exports = function(context) {
5858
'Program:exit': () => reportIfMissing(context)
5959
};
6060
};
61+
62+
module.exports.meta = {
63+
fixable: 'code'
64+
};

tools/eslint-rules/inspector-check.js

+4
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ module.exports = function(context) {
5959
'Program:exit': () => reportIfMissing(context)
6060
};
6161
};
62+
63+
module.exports.meta = {
64+
fixable: 'code'
65+
};

tools/eslint-rules/lowercase-name-for-primitive.js

+4
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,7 @@ module.exports = function(context) {
5353
[astSelector]: (node) => checkNamesArgument(node)
5454
};
5555
};
56+
57+
module.exports.meta = {
58+
fixable: 'code'
59+
};

tools/eslint-rules/non-ascii-character.js

+4
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ module.exports = (context) => {
5959
Program: (node) => reportIfError(node, context.getSourceCode())
6060
};
6161
};
62+
63+
module.exports.meta = {
64+
fixable: 'code'
65+
};

tools/eslint-rules/prefer-assert-iferror.js

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
const utils = require('./rules-utils.js');
99

1010
module.exports = {
11+
meta: {
12+
fixable: 'code'
13+
},
1114
create(context) {
1215
const sourceCode = context.getSourceCode();
1316
let assertImported = false;

tools/eslint-rules/prefer-assert-methods.js

+4
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ module.exports = function(context) {
4242
}
4343
};
4444
};
45+
46+
module.exports.meta = {
47+
fixable: 'code'
48+
};

0 commit comments

Comments
 (0)