mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
This commit is contained in:
@@ -12,6 +12,9 @@ const message =
|
||||
'(e.g. with `.then(common.mustCall())`)';
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
fixable: 'code'
|
||||
},
|
||||
create: function(context) {
|
||||
let hasCommonModule = false;
|
||||
return {
|
||||
|
||||
@@ -120,3 +120,7 @@ module.exports = function(context) {
|
||||
'Program:exit': () => reportIfMissingCheck()
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.meta = {
|
||||
fixable: 'code'
|
||||
};
|
||||
|
||||
@@ -58,3 +58,7 @@ module.exports = function(context) {
|
||||
'Program:exit': () => reportIfMissing(context)
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.meta = {
|
||||
fixable: 'code'
|
||||
};
|
||||
|
||||
@@ -59,3 +59,7 @@ module.exports = function(context) {
|
||||
'Program:exit': () => reportIfMissing(context)
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.meta = {
|
||||
fixable: 'code'
|
||||
};
|
||||
|
||||
@@ -53,3 +53,7 @@ module.exports = function(context) {
|
||||
[astSelector]: (node) => checkNamesArgument(node)
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.meta = {
|
||||
fixable: 'code'
|
||||
};
|
||||
|
||||
@@ -59,3 +59,7 @@ module.exports = (context) => {
|
||||
Program: (node) => reportIfError(node, context.getSourceCode())
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.meta = {
|
||||
fixable: 'code'
|
||||
};
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
const utils = require('./rules-utils.js');
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
fixable: 'code'
|
||||
},
|
||||
create(context) {
|
||||
const sourceCode = context.getSourceCode();
|
||||
let assertImported = false;
|
||||
|
||||
@@ -42,3 +42,7 @@ module.exports = function(context) {
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.meta = {
|
||||
fixable: 'code'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user