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: https://github.com/nodejs/node/pull/34589
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
pull/34589/head
cjihrig 2020-08-01 14:22:51 -04:00
parent 6e65f26b73
commit ee0b44fd93
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
8 changed files with 30 additions and 0 deletions

View File

@ -12,6 +12,9 @@ const message =
'(e.g. with `.then(common.mustCall())`)';
module.exports = {
meta: {
fixable: 'code'
},
create: function(context) {
let hasCommonModule = false;
return {

View File

@ -120,3 +120,7 @@ module.exports = function(context) {
'Program:exit': () => reportIfMissingCheck()
};
};
module.exports.meta = {
fixable: 'code'
};

View File

@ -58,3 +58,7 @@ module.exports = function(context) {
'Program:exit': () => reportIfMissing(context)
};
};
module.exports.meta = {
fixable: 'code'
};

View File

@ -59,3 +59,7 @@ module.exports = function(context) {
'Program:exit': () => reportIfMissing(context)
};
};
module.exports.meta = {
fixable: 'code'
};

View File

@ -53,3 +53,7 @@ module.exports = function(context) {
[astSelector]: (node) => checkNamesArgument(node)
};
};
module.exports.meta = {
fixable: 'code'
};

View File

@ -59,3 +59,7 @@ module.exports = (context) => {
Program: (node) => reportIfError(node, context.getSourceCode())
};
};
module.exports.meta = {
fixable: 'code'
};

View File

@ -8,6 +8,9 @@
const utils = require('./rules-utils.js');
module.exports = {
meta: {
fixable: 'code'
},
create(context) {
const sourceCode = context.getSourceCode();
let assertImported = false;

View File

@ -42,3 +42,7 @@ module.exports = function(context) {
}
};
};
module.exports.meta = {
fixable: 'code'
};