Skip to content

Commit

Permalink
tools: add meta.fixable to fixable lint rules
Browse files Browse the repository at this point in the history
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 <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
cjihrig authored and codebytere committed Aug 6, 2020
1 parent e9aebc3 commit 0b1616c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/eslint-rules/crypto-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,7 @@ module.exports = function(context) {
'Program:exit': () => reportIfMissingCheck()
};
};

module.exports.meta = {
fixable: 'code'
};
4 changes: 4 additions & 0 deletions tools/eslint-rules/eslint-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ module.exports = function(context) {
'Program:exit': () => reportIfMissing(context)
};
};

module.exports.meta = {
fixable: 'code'
};
4 changes: 4 additions & 0 deletions tools/eslint-rules/inspector-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ module.exports = function(context) {
'Program:exit': () => reportIfMissing(context)
};
};

module.exports.meta = {
fixable: 'code'
};
4 changes: 4 additions & 0 deletions tools/eslint-rules/lowercase-name-for-primitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ module.exports = function(context) {
[astSelector]: (node) => checkNamesArgument(node)
};
};

module.exports.meta = {
fixable: 'code'
};
4 changes: 4 additions & 0 deletions tools/eslint-rules/non-ascii-character.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ module.exports = (context) => {
Program: (node) => reportIfError(node, context.getSourceCode())
};
};

module.exports.meta = {
fixable: 'code'
};
3 changes: 3 additions & 0 deletions tools/eslint-rules/prefer-assert-iferror.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
const utils = require('./rules-utils.js');

module.exports = {
meta: {
fixable: 'code'
},
create(context) {
const sourceCode = context.getSourceCode();
let assertImported = false;
Expand Down
4 changes: 4 additions & 0 deletions tools/eslint-rules/prefer-assert-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ module.exports = function(context) {
}
};
};

module.exports.meta = {
fixable: 'code'
};

0 comments on commit 0b1616c

Please sign in to comment.