Skip to content

Commit

Permalink
remove rule from rc file
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinmombay committed Feb 26, 2021
1 parent 8d1e06a commit 5d3a4e9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 49 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ module.exports = {
'local/no-import-meta': 2,
'local/no-import-rename': 2,
'local/no-invalid-this': 2,
'local/no-is-amp-alt': 2,
'local/no-log-array': 2,
'local/no-mixed-interpolation': 2,
'local/no-mixed-operators': 2,
Expand Down
81 changes: 33 additions & 48 deletions src/amp.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,57 +131,42 @@ startupChunk(self.document, function initial() {
installPerformanceService(self);
/** @const {!./service/performance-impl.Performance} */
const perf = Services.performanceFor(self);
if (
self.document.documentElement.hasAttribute('i-amphtml-no-boilerplate')
) {
if (self.document.documentElement.hasAttribute('i-amphtml-no-boilerplate')) {
perf.addEnabledExperiment('no-boilerplate');
}
startupChunk(self.document, function initial() {
/** @const {!./service/ampdoc-impl.AmpDoc} */
const ampdoc = ampdocService.getAmpDoc(self.document);
installPlatformService(self);
installPerformanceService(self);
/** @const {!./service/performance-impl.Performance} */
const perf = Services.performanceFor(self);
if (
self.document.documentElement.hasAttribute('i-amphtml-no-boilerplate')
) {
perf.addEnabledExperiment('no-boilerplate');
}
if (IS_ESM) {
perf.addEnabledExperiment('esm');
}
fontStylesheetTimeout(self);
perf.tick(TickLabel.INSTALL_STYLES);
if (IS_ESM) {
bootstrap(ampdoc, perf);
} else {
installStylesForDoc(
ampdoc,
ampDocCss + ampSharedCss,
() => bootstrap(ampdoc, perf),
/* opt_isRuntimeCss */ true,
/* opt_ext */ 'amp-runtime'
);
}
});

// Output a message to the console and add an attribute to the <html>
// tag to give some information that can be used in error reports.
// (At least by sophisticated users).
if (self.console) {
(console.info || console.log).call(
console,
`Powered by AMP ⚡ HTML – Version ${internalRuntimeVersion()}`,
self.location.href
);
if (IS_ESM) {
perf.addEnabledExperiment('esm');
}
// This code is eleminated in prod build through a babel transformer.
if (getMode().localDev) {
self.document.documentElement.setAttribute('esm', IS_ESM ? 1 : 0);
fontStylesheetTimeout(self);
perf.tick(TickLabel.INSTALL_STYLES);
if (IS_ESM) {
bootstrap(ampdoc, perf);
} else {
installStylesForDoc(
ampdoc,
ampDocCss + ampSharedCss,
() => bootstrap(ampdoc, perf),
/* opt_isRuntimeCss */ true,
/* opt_ext */ 'amp-runtime'
);
}
self.document.documentElement.setAttribute(
'amp-version',
internalRuntimeVersion()
});

// Output a message to the console and add an attribute to the <html>
// tag to give some information that can be used in error reports.
// (At least by sophisticated users).
if (self.console) {
(console.info || console.log).call(
console,
`Powered by AMP ⚡ HTML – Version ${internalRuntimeVersion()}`,
self.location.href
);
}
// This code is eleminated in prod build through a babel transformer.
if (getMode().localDev) {
self.document.documentElement.setAttribute('esm', IS_ESM ? 1 : 0);
}
self.document.documentElement.setAttribute(
'amp-version',
internalRuntimeVersion()
);

0 comments on commit 5d3a4e9

Please sign in to comment.