Skip to content

Commit

Permalink
Fix nits in #34376 (#34392)
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell authored May 14, 2021
1 parent c950d87 commit 2271ac3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,5 @@ module.exports = {
'google-camelcase/google-camelcase': 0,
},
},
{
'files': ['src/base-element.js'],
'rules': {
'local/no-private-props': 2,
},
},
],
};
6 changes: 3 additions & 3 deletions build-system/eslint-rules/no-private-props.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016 The AMP HTML Authors. All Rights Reserved.
* Copyright 2021 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,7 @@ module.exports = {
context.report({
node,
message:
'Unqouted private properties are not allowed in BaseElement. Please use quotes',
'Unquoted private properties are not allowed in BaseElement. Please use quotes',
fix(fixer) {
const {object} = node;
return fixer.replaceTextRange(
Expand All @@ -55,7 +55,7 @@ module.exports = {
context.report({
node,
message:
'Unqouted private methods are not allowed in BaseElement. Please use quotes',
'Unquoted private methods are not allowed in BaseElement. Please use quotes',
fix(fixer) {
return fixer.replaceText(node.key, `['${node.key.name}']`);
},
Expand Down
6 changes: 6 additions & 0 deletions src/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,11 @@ module.exports = {
],
'rules': {'local/no-global': 0},
},
{
'files': ['./base-element.js'],
'rules': {
'local/no-private-props': 2,
},
},
],
};
4 changes: 2 additions & 2 deletions src/base-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ export class BaseElement {
\__/ \__/ /__/ \__\ | _| `._____||__| \__| |__| |__| \__| \______|
Any private property for BaseElement MUST be wrapped with quotes. We cannot
allow Closure Compiler to mangle privates in this class, becasue it can
reuse the same mangled name for a different property in, ie., amp-youtube's
allow Closure Compiler to mangle privates in this class, because it can
reuse the same mangled name for a different property in, i.e., amp-youtube's
BaseElement subclass (which lives in a different binary).
*/

Expand Down

0 comments on commit 2271ac3

Please sign in to comment.