Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
  • Loading branch information
bpmutter and mdjermanovic committed Jun 8, 2023
1 parent dcc249d commit 15f2012
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/src/extend/custom-rule-tutorial.md
Expand Up @@ -100,7 +100,6 @@ module.exports = {
create(context) {
return {
// TODO: add callback function(s)
}
};
}
};
Expand All @@ -125,7 +124,7 @@ module.exports = {
docs: {
description: "Enforce that a variable named `foo` can only be assigned a value of 'bar'.",
},
fixable: "code"
fixable: "code"
},
create(context) {
return {
Expand Down Expand Up @@ -200,7 +199,7 @@ const fooBarRule = require("./enforce-foo-bar");

const ruleTester = new RuleTester({
// Must use at least ecmaVersion 2015 because
// that's when `const` variable introduced.
// that's when `const` variables were introduced.
parserOptions: { ecmaVersion: 2015 }
});

Expand All @@ -215,7 +214,7 @@ ruleTester.run(
}],
// 'invalid' checks cases that should not pass
invalid: [{
code:"const foo = 'baz';",
code: "const foo = 'baz';",
output: 'const foo = "bar";',
errors: 1,
}],
Expand Down

0 comments on commit 15f2012

Please sign in to comment.