Skip to content

Commit

Permalink
Merge pull request #7288 from Agoric/ari/lintfixup
Browse files Browse the repository at this point in the history
lint: specify name for identifier
  • Loading branch information
mergify[bot] authored Mar 31, 2023
2 parents 501fa39 + 4462522 commit f4de2ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ const deprecatedTerminology = [
['whitelist', 'allowlist'],
['RUN', 'IST', '/RUN/'],
].flatMap(([bad, good, badRgx = `/${bad}/i`]) =>
['Literal', 'TemplateLiteral', 'Identifier'].map(selectorType => ({
selector: `${selectorType}[value=${badRgx}]`,
[
['Literal', 'value'],
['TemplateElement', 'value.raw'],
['Identifier', 'name'],
].map(([selectorType, field]) => ({
selector: `${selectorType}[${field}=${badRgx}]`,
message: `Use '${good}' instead of deprecated '${bad}'`,
})),
);
Expand Down

0 comments on commit f4de2ed

Please sign in to comment.