Attribute Quote Removal
"])); diff --git a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/input.js b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/input.js index 52513aa30dcd..0a864f850615 100644 --- a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const x = html; console.log(x`html usage`); const html = htmlFor(element); diff --git a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/output.js b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/output.js index 34afb24d7302..6e64a60a150f 100644 --- a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/indirect/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const x = html; console.log(x`html usage`); const html = htmlFor(element); diff --git a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/input.js b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/input.js index 1b88fa0c00ff..cf54ee3480af 100644 --- a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - console.log(html`html ${foo}`); console.log(html`html ${foo} another`); console.log(html`html ${foo} another ${bar} thing`); diff --git a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/output.js b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/output.js index 16951a354d5c..cf54ee3480af 100644 --- a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/invalid/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ console.log(html`html ${foo}`); console.log(html`html ${foo} another`); console.log(html`html ${foo} another ${bar} thing`); diff --git a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/input.js b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/input.js index ede2ce220d70..95bb9acb9215 100644 --- a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - console.log(`template literal`); const stringReplacement = 'yo'; console.log(`template (${stringReplacement}) literal`); diff --git a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/output.js b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/output.js index 22f97010b0e9..39d3c52a98fa 100644 --- a/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ console.log(`template literal`); const stringReplacement = 'yo'; console.log(`template (${stringReplacement}) literal`); diff --git a/build-system/babel-plugins/babel-plugin-transform-html-template/test/index.js b/build-system/babel-plugins/babel-plugin-transform-html-template/test/index.js index 7b6d7376a749..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-html-template/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-html-template/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js index 86c4e09b415e..8b1f80a1599e 100644 --- a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js @@ -1,18 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // @ts-nocheck const {dirname, join: joinPath, relative} = require('path'); diff --git a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/exported.mjs b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/exported.mjs index eb2394217e3a..5db806cf8db3 100644 --- a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/exported.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/exported.mjs @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export const exportedEnum = { FOO: 'A', BAR: 'B', diff --git a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/input.mjs b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/input.mjs index 98f2d84c03db..c668f0e2b159 100644 --- a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/input.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/input.mjs @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import {exportedEnum} from './exported.mjs'; isEnumValue(exportedEnum, subject); diff --git a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/output.mjs b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/output.mjs index d6752c0979ba..5923e3b0b9c9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/output.mjs @@ -1,18 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { exportedEnum } from './exported.mjs'; subject === "A" || subject === "B" || subject === "C"; const enumInFile = { diff --git a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/index.js b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/index.js index 762295c3a9c8..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/index.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/index.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/index.js index cdfa1ad0b04d..8a089ab9fae5 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/index.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // @ts-nocheck /** diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/input.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/input.js index a0c97ef9760f..b089f72d7034 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - jsonLiteral({ 'dblquote': 'a[href$=".pdf"]', 'interpolate': '${foo}', diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/output.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/output.js index 0c80b8d3c6bf..3fc10a293706 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/escapes/output.js @@ -1,17 +1,2 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ `{"dblquote":"a[href$=\\".pdf\\"]","interpolate":"\${foo}","escape":"\\\\u00f8C","tick":"foo\`bar"}`; JSON.parse(`{"dblquote":"a[href$=\\".pdf\\"]","interpolate":"\${foo}","escape":"\\\\u00f8C","tick":"foo\`bar"}`); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/input.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/input.js index e0b1afc3adea..915a053f29d0 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const inner = jsonLiteral({ inner: true, }); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/output.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/output.js index 7f1d28fb636c..ee0f4efbddfa 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/json-literal/output.js @@ -1,17 +1,2 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const inner = `{"inner":true}`; JSON.parse(`{"config":${inner}}`); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/input.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/input.js index 4e4c173210dc..f9de23a0e974 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - jsonConfiguration({}); jsonConfiguration({a: 1}); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/output.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/output.js index acf68036b6ae..c7e71ddb343e 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/fixtures/transform/transform/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ JSON.parse(`{}`); JSON.parse(`{"a":1}`); JSON.parse(`{"b":["test"]}`); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/index.js b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/index.js index 44564fa07fec..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-configuration/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/index.js b/build-system/babel-plugins/babel-plugin-transform-json-import/index.js index 56f3e1d57af7..24e58e165b11 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const {dirname, join, relative, resolve} = require('path'); const {readFileSync} = require('fs'); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-cant-load-json/input.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-cant-load-json/input.js index 05b2e1a392ef..9f7f59494ab5 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-cant-load-json/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-cant-load-json/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import json from './404.json' assert { type: 'json' }; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-assertion/input.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-assertion/input.js index c16088d63e2e..35c763f6e817 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-assertion/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-assertion/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import json from './options.json' assert { more: 'other' }; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-json-assertion/input.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-json-assertion/input.js index 8a741e52b7a4..20e66cd7745a 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-json-assertion/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-not-type-json-assertion/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import json from './options.json' assert { type: 'other' }; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-too-many-assertions/input.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-too-many-assertions/input.js index bf8b5356330e..0ae6d521634f 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-too-many-assertions/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/error-too-many-assertions/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import json from './options.json' assert { type: 'json', more: 'other' }; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/input.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/input.js index 98d9f9b0f46f..4fcea0772111 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import key from './options.json' assert { type: 'json' }; import string from './options.json' assert { "type": 'json' }; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/output.mjs b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/output.mjs index 2c01e1fa90ff..9b36c77da340 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-freeze/output.mjs @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const key = JSON.parse("{\"plugins\":[[\"../../../..\",{\"freeze\":true}]],\"sourceType\":\"module\"}", function (key, val) { if (typeof val === 'object') Object.freeze(val); return val; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/input.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/input.js index 98d9f9b0f46f..4fcea0772111 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import key from './options.json' assert { type: 'json' }; import string from './options.json' assert { "type": 'json' }; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/output.mjs b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/output.mjs index b862d0800a56..1b0472ba1bcc 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform-no-freeze/output.mjs @@ -1,17 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const key = JSON.parse("{\"plugins\":[[\"../../../..\",{\"freeze\":false}]],\"sourceType\":\"module\"}"); const string = JSON.parse("{\"plugins\":[[\"../../../..\",{\"freeze\":false}]],\"sourceType\":\"module\"}"); diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/input.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/input.js index 98d9f9b0f46f..4fcea0772111 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import key from './options.json' assert { type: 'json' }; import string from './options.json' assert { "type": 'json' }; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/output.mjs b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/output.mjs index 084b4643d22f..a292d6914404 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/fixtures/transform-assertions/transform/output.mjs @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const key = JSON.parse("{\"plugins\":[\"../../../..\"],\"sourceType\":\"module\"}", function (key, val) { if (typeof val === 'object') Object.freeze(val); return val; diff --git a/build-system/babel-plugins/babel-plugin-transform-json-import/test/index.js b/build-system/babel-plugins/babel-plugin-transform-json-import/test/index.js index bb2e50c56b6a..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-json-import/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-json-import/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/create-hash.js b/build-system/babel-plugins/babel-plugin-transform-jss/create-hash.js index bd75969db79f..2684cd1bdb4b 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/create-hash.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/create-hash.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const crypto = require('crypto'); // This is in its own file in order to make it easy to stub in tests. diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/index.js b/build-system/babel-plugins/babel-plugin-transform-jss/index.js index 3afebc64b0af..7c73d6c02303 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/index.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // @ts-nocheck /** diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/input.js b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/input.js index 3e489713c512..c8dfc37fff56 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import {createUseStyles} from 'react-jss'; const JSS = {button: {fontSize: 12}}; export const useStyles = createUseStyles(JSS); diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/output.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/output.mjs index e26871f07bbf..dc582569bcee 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-non-jss-file/output.mjs @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { createUseStyles } from 'react-jss'; const JSS = { button: { diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/input.js b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/input.js index c134476e3ecb..c7572bf077dc 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import {createUseStyles} from 'react-jss'; export const useStyles = createUseStyles({ diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/output.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/output.mjs index 091472ce0622..4aa27f3da6f9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/ignore-unrelated-exports/output.mjs @@ -3,22 +3,6 @@ var _classes = { floatLeft: "float-left-07984bd" }; export const $floatLeft = "float-left-07984bd"; - -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export const useStyles = () => _classes; // These next lines should be unaffected by jss transform. export const CSS = ".float-left-07984bd{float:left}"; diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs index 821c11ff5fb9..a98af0bd63b0 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - // useStyles() references that don't belong to a MemberExpression should be // preserve the classname object. diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs index 337b61667d25..f133cd409819 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs @@ -1,21 +1,5 @@ import { $thisOneIsOptimized as _$thisOneIsOptimized2 } from "./bar.jss"; import { $thisOneIsOptimized as _$thisOneIsOptimized } from "./foo.jss"; - -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // useStyles() references that don't belong to a MemberExpression should be // preserve the classname object. // TODO(alanorozco): It would be nice if these cases were linted to prevent diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs index 2f1f8d6d6212..802b4e0137a7 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import {useStyles} from '../foo.jss'; import {useStyles as useSomeOtherNameWithStyles} from './something.jss'; diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs index 0b9f4881be85..4cebfed48dc4 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs @@ -5,22 +5,6 @@ import { $x as _$x2 } from "../foo.jss"; import { $foo as _$foo } from "./something.jss"; import { $x as _$x } from "../foo.jss"; import { $b as _$b } from "../foo.jss"; - -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { useStyles } from '../foo.jss'; import { useStyles as useSomeOtherNameWithStyles } from './something.jss'; console.log(_$b); diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/input.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/input.mjs index 9dd5b0c9696b..46f7a563111c 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/input.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/input.mjs @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import {useStyles} from 'foo'; const direct = useStyles(); diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/output.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/output.mjs index 15ef1e0ed863..3bb1cadd4db6 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-variable-refs/output.mjs @@ -2,22 +2,6 @@ import { $objectPatternPropertyIndirect as _$objectPatternPropertyIndirect } fro import { $memberExpressionIndirect as _$memberExpressionIndirect } from "foo"; import { $objectPatternProperty as _$objectPatternProperty } from "foo"; import { $memberExpression as _$memberExpression } from "foo"; - -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { useStyles } from 'foo'; _$memberExpression; const objectPatternProperty = _$objectPatternProperty; diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-classname/input.js b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-classname/input.js index d8fba9fc2a00..1f0b8715b029 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-classname/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-classname/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - // Throws because cant use classname "CSS", as it conflicts with this transform. import {createUseStyles} from 'react-jss'; export const useStyles = createUseStyles({CSS: {fontSize: 12}}); diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-confidence/input.js b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-confidence/input.js index 411572a0b72c..438455b762cb 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-confidence/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-throw-confidence/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - // Throws because object spread is not statically evaluable. import {createUseStyles} from 'react-jss'; const foo = {foo: 7} diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/input.js b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/input.js index 22a0e05a0901..1e9b2f58c688 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/input.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import {createUseStyles} from 'react-jss' const JSS = {button: {fontSize: 12}}; diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/output.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/output.mjs index 4150a4b53e1d..51be9dc26219 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-jss-var/output.mjs @@ -2,22 +2,6 @@ var _classes = { button: "button-21aa4a8" }; - -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const JSS = { button: { fontSize: 12 diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/input.js b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/input.js index 2c112dcaeb25..14435c0455dc 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/input.js @@ -1,18 +1,4 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + import {createUseStyles} from 'react-jss'; diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/output.mjs b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/output.mjs index 9cec9b482330..613985374769 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-transform-literal/output.mjs @@ -5,21 +5,5 @@ var _classes = { }; export const $floatLeft = "float-left-a6c6677"; export const $fill = "fill-a6c6677"; - -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export const useStyles = () => _classes; export const CSS = ".float-left-a6c6677{float:left;border:1px solid #000}.fill-a6c6677{-ms-flex:1 1 auto;flex:1 1 auto;display:block;position:relative}"; diff --git a/build-system/babel-plugins/babel-plugin-transform-jss/test/index.js b/build-system/babel-plugins/babel-plugin-transform-jss/test/index.js index fd57322cb9d1..9345d8dce828 100644 --- a/build-system/babel-plugins/babel-plugin-transform-jss/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-jss/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const babel = require('@babel/core'); const path = require('path'); const runner = require('@babel/helper-plugin-test-runner').default; diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/index.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/index.js index 7c165dd92232..7d20ad5af51d 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/index.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // @ts-nocheck /** diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/input.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/input.js index 0608ad1edef7..6ec2d14c098c 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/input.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // One of method name or singleton name are invalid, so they stay the same. notDev().assert('not', 'transformed'); aRandomModule().createError('not transformed'); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/output.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/output.js index 0608ad1edef7..6ec2d14c098c 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/invalid/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // One of method name or singleton name are invalid, so they stay the same. notDev().assert('not', 'transformed'); aRandomModule().createError('not transformed'); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/input.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/input.js index ef8624246de1..f3f8bf43be09 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/input.js @@ -1,17 +1,2 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // No arguments, should be indirected. dev().createError('This is an error with no arguments.'); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/output.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/output.js index 5714880f1e48..1382e4a8012f 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-args/output.js @@ -1,17 +1,2 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // No arguments, should be indirected. dev().createError(["0"]); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/input.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/input.js index 4c71f5192fa0..3e469263b0da 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/input.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // No message, stays the same. user().assert(1 + 1); const result1 = user().assert(1 + 1); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/output.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/output.js index 4c71f5192fa0..3e469263b0da 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/no-message/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // No message, stays the same. user().assert(1 + 1); const result1 = user().assert(1 + 1); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/input.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/input.js index a1477f5c2220..fefdb8a15ac1 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/input.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // One argument in variadic method, should be indirected unless the message // argument itself is variable or the string is small enough that indirection // would increase file size. diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/output.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/output.js index 6aaa8c959331..fbe194dac012 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/one-arg-variadic/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // One argument in variadic method, should be indirected unless the message // argument itself is variable or the string is small enough that indirection // would increase file size. diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/input.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/input.js index 2eca7e3afc45..4faae6331513 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/input.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ user().assert(true, `I'm a ${template} literal with one argument.`); user().assert(x != y, `I have ${foo}, ${bar} and ${baz}.`); userAssert(false, `Template ${index} = 2`); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/output.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/output.js index e80c8be7269e..8001adacc7b1 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/fixtures/transform-log-methods/template-literals/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ user().assert(true, ["0", template]); user().assert(x != y, ["1", foo, bar, baz]); userAssert(false, ["2", index]); diff --git a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/index.js b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/index.js index 98bb5d3c763c..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-log-methods/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-log-methods/test/index.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-minified-comments/index.js b/build-system/babel-plugins/babel-plugin-transform-minified-comments/index.js index bac5cae662dc..3684eeccb24f 100644 --- a/build-system/babel-plugins/babel-plugin-transform-minified-comments/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-minified-comments/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Ensure comments in minified build output is minimal. * diff --git a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/input.js b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/input.js index f323fce29f27..38f6433166be 100644 --- a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const Gd={PRERENDER:"prerender",VISIBLE:"visible",HIDDEN:"hidden",PAUSED:"paused",INACTIVE:"inactive"};/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. diff --git a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/output.js b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/output.js index 1c1aae283a15..4491a80b3346 100644 --- a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses-tabs/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const Gd = { PRERENDER: "prerender", VISIBLE: "visible", diff --git a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/input.js b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/input.js index 4bcf05402278..50c17d04062b 100644 --- a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const Gd={PRERENDER:"prerender",VISIBLE:"visible",HIDDEN:"hidden",PAUSED:"paused",INACTIVE:"inactive"};/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. diff --git a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/output.js b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/output.js index 1c1aae283a15..4491a80b3346 100644 --- a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/fixtures/transform/licenses/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const Gd = { PRERENDER: "prerender", VISIBLE: "visible", diff --git a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/index.js b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/index.js index bb2e50c56b6a..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-minified-comments/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-parenthesize-expression/index.js b/build-system/babel-plugins/babel-plugin-transform-parenthesize-expression/index.js index cbc0b624c364..cc9219d97170 100644 --- a/build-system/babel-plugins/babel-plugin-transform-parenthesize-expression/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-parenthesize-expression/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @interface {babel.PluginPass} * @param {babel} babel diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/index.js b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/index.js index 2c653ff97539..b2bb249d06f8 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const pathmodule = require('path'); const {addNamed} = require('@babel/helper-module-imports'); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/input.js b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/input.js index 3b32772c7b92..47816b77427d 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - Promise.resolve(1); Promise.resolve(undefined); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/output.mjs b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/output.mjs index 149f92c68c6b..47816b77427d 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/argument/output.mjs @@ -1,17 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ Promise.resolve(1); Promise.resolve(undefined); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/input.js b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/input.js index 3f113ebbdb2d..17b7d9966032 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - Promise.reject(); Promise.resolve.x(); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/output.mjs b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/output.mjs index 27b766086b3b..17b7d9966032 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/not-promise-resolve/output.mjs @@ -1,17 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ Promise.reject(); Promise.resolve.x(); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/input.js b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/input.js index e16e538767a8..9366dd8951c9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - Promise.resolve(); Promise.resolve().then(() => {}); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/output.mjs b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/output.mjs index da2bcedd962b..3cf0ef279202 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/promise-resolve/output.mjs @@ -1,21 +1,6 @@ import { resolvedPromise as _resolvedPromise2 } from "./../../../../../../../src/core/data-structures/promise"; import { resolvedPromise as _resolvedPromise } from "./../../../../../../../src/core/data-structures/promise"; -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ _resolvedPromise(); _resolvedPromise2().then(() => {}); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/input.js b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/input.js index e16e538767a8..9366dd8951c9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/input.js @@ -1,18 +1,2 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - Promise.resolve(); Promise.resolve().then(() => {}); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs index bf6f5a36fac4..5eecb612a4e5 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs @@ -1,21 +1,6 @@ import { resolvedPromise as _resolvedPromise2 } from "./core/data-structures/promise"; import { resolvedPromise as _resolvedPromise } from "./core/data-structures/promise"; -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ _resolvedPromise(); _resolvedPromise2().then(() => {}); diff --git a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/index.js b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/index.js index 7b6d7376a749..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-remove-directives/index.js b/build-system/babel-plugins/babel-plugin-transform-remove-directives/index.js index 0f1c290151ca..e492d696ba78 100644 --- a/build-system/babel-plugins/babel-plugin-transform-remove-directives/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-remove-directives/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @interface {babel.PluginPass} * @return {babel.PluginObj} diff --git a/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/input.js b/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/input.js index 13b19c148a6b..16b2c20ddfc0 100644 --- a/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - function without() {} 'use strict'; diff --git a/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/output.js b/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/output.js index 158ac580aa45..ffb204942b7f 100644 --- a/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/fixtures/transform/directives/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ function without() {} 'use strict'; diff --git a/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/index.js b/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/index.js index bb2e50c56b6a..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-remove-directives/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/index.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/index.js index 6ee74a282cc7..48df0353a4c6 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const ESCAPE_REGEX = /\${|\\|`/g; /** diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js index 503c3c85be06..b641f949577d 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - let add = `/rtv` + `/bar`; let multipleAdd = `/rtv` + `/bar` + `/`; let subtract = `/rtv` - `r`; diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js index 6e03c014dcdb..469210ca5321 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ let add = "/rtv/bar"; let multipleAdd = "/rtv/bar/"; let subtract = "/rtv" - "r"; diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/input.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/input.js index 4abd32666c43..3fb2aa59b25a 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/input.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - let none = `/rtv/100/log-messages.simple.json`; let start = `${'123'}/foo`; let middle = `/rtv/${'012003312116250'}/log-messages.simple.json`; diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/output.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/output.js index e25a50ce7b98..5e9b104ff2ce 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/literals/output.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ let none = "/rtv/100/log-messages.simple.json"; let start = "123/foo"; let middle = "/rtv/012003312116250/log-messages.simple.json"; diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/index.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/index.js index bb2e50c56b6a..23251129fae9 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/index.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/index.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const runner = require('@babel/helper-plugin-test-runner').default; runner(__dirname); diff --git a/build-system/babel-plugins/log-module-metadata.js b/build-system/babel-plugins/log-module-metadata.js index 83fea2763fdd..752a81584c77 100644 --- a/build-system/babel-plugins/log-module-metadata.js +++ b/build-system/babel-plugins/log-module-metadata.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** @fileoverview Definitions of logging methods for transforms and linting. */ /** diff --git a/build-system/babel-plugins/static-template-metadata.js b/build-system/babel-plugins/static-template-metadata.js index ca1e764270f1..2182f293cc69 100644 --- a/build-system/babel-plugins/static-template-metadata.js +++ b/build-system/babel-plugins/static-template-metadata.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** Metadata for static template functions `htmlFor` and `svgFor`. */ /** diff --git a/build-system/babel-plugins/testSetupFile.js b/build-system/babel-plugins/testSetupFile.js index 856ea3b4bdd4..77f69c87e7fa 100644 --- a/build-system/babel-plugins/testSetupFile.js +++ b/build-system/babel-plugins/testSetupFile.js @@ -1,17 +1 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - jest.setTimeout(10000); // eslint-disable-line no-undef diff --git a/build-system/common/check-package-manager.js b/build-system/common/check-package-manager.js index bf4190b9936c..8c7d8317a4b7 100644 --- a/build-system/common/check-package-manager.js +++ b/build-system/common/check-package-manager.js @@ -1,19 +1,5 @@ #!/usr/bin/env node -/** - * Copyright 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + 'use strict'; /** diff --git a/build-system/common/ci.js b/build-system/common/ci.js index c28b84080299..55cd34a2fabb 100644 --- a/build-system/common/ci.js +++ b/build-system/common/ci.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/common/colors.js b/build-system/common/colors.js index b437edff8187..b81e4a0d98b3 100644 --- a/build-system/common/colors.js +++ b/build-system/common/colors.js @@ -1,18 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const colors = require('kleur/colors'); /** diff --git a/build-system/common/ctrlcHandler.js b/build-system/common/ctrlcHandler.js index 28e526c1313d..28bf8e9ad3ed 100644 --- a/build-system/common/ctrlcHandler.js +++ b/build-system/common/ctrlcHandler.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const colors = require('./colors'); const {exec, execScriptAsync} = require('./exec'); const {logLocalDev} = require('./logging'); diff --git a/build-system/common/debounce.js b/build-system/common/debounce.js index c2cf45c376b8..0f1ee42b511b 100644 --- a/build-system/common/debounce.js +++ b/build-system/common/debounce.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const lodashDebounce = require('lodash.debounce'); /** diff --git a/build-system/common/diff.js b/build-system/common/diff.js index 1ab7bb559659..e14c24c79332 100644 --- a/build-system/common/diff.js +++ b/build-system/common/diff.js @@ -1,18 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const argv = require('minimist')(process.argv.slice(2)); const tempy = require('tempy'); const {blue, bold, cyan, red} = require('./colors'); diff --git a/build-system/common/esbuild-babel.js b/build-system/common/esbuild-babel.js index 708f059e4503..020862bb8a5e 100644 --- a/build-system/common/esbuild-babel.js +++ b/build-system/common/esbuild-babel.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const babel = require('@babel/core'); const path = require('path'); const {debug} = require('../compile/debug-compilation-lifecycle'); diff --git a/build-system/common/exec.js b/build-system/common/exec.js index 3e3e535eb65f..0b35c3fb10e9 100644 --- a/build-system/common/exec.js +++ b/build-system/common/exec.js @@ -1,18 +1,3 @@ -/** - * Copyright 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/common/git.js b/build-system/common/git.js index 6e0d52e07611..3b85564ee142 100644 --- a/build-system/common/git.js +++ b/build-system/common/git.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/common/logging.js b/build-system/common/logging.js index 765b8e81f63d..41d6baf95889 100644 --- a/build-system/common/logging.js +++ b/build-system/common/logging.js @@ -1,18 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const {bold, gray, yellow} = require('./colors'); diff --git a/build-system/common/npm-checks.js b/build-system/common/npm-checks.js index fcdcb30a19f1..eb8622309aaa 100644 --- a/build-system/common/npm-checks.js +++ b/build-system/common/npm-checks.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/common/process.js b/build-system/common/process.js index 88ad0b06391a..a6426c48b224 100644 --- a/build-system/common/process.js +++ b/build-system/common/process.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/common/transform-cache.js b/build-system/common/transform-cache.js index 2434fa98552c..d8650a57c23e 100644 --- a/build-system/common/transform-cache.js +++ b/build-system/common/transform-cache.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const crypto = require('crypto'); const fs = require('fs-extra'); const path = require('path'); diff --git a/build-system/common/update-packages.js b/build-system/common/update-packages.js index a01da3eb0799..fb6563e2e73b 100644 --- a/build-system/common/update-packages.js +++ b/build-system/common/update-packages.js @@ -1,18 +1,3 @@ -/** - * Copyright 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const checkDependencies = require('check-dependencies'); diff --git a/build-system/common/update-session-issues/index.js b/build-system/common/update-session-issues/index.js index 26b110f3b0de..dc8c7815db42 100644 --- a/build-system/common/update-session-issues/index.js +++ b/build-system/common/update-session-issues/index.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @fileoverview * Updates Github issues for scheduled public sessions, like diff --git a/build-system/common/update-session-issues/template/design-review.js b/build-system/common/update-session-issues/template/design-review.js index 96c357d55ac0..e19a030776e6 100644 --- a/build-system/common/update-session-issues/template/design-review.js +++ b/build-system/common/update-session-issues/template/design-review.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const sessionDurationHours = 1; /** diff --git a/build-system/common/update-session-issues/types.js b/build-system/common/update-session-issues/types.js index 1c83301434d2..d721dec57002 100644 --- a/build-system/common/update-session-issues/types.js +++ b/build-system/common/update-session-issues/types.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** @typedef {0|1|2|3|4|5|6} */ let DayOfWeekDef; // sunday = 0, monday = 1, ... diff --git a/build-system/common/utils.js b/build-system/common/utils.js index 3f32ce4fa114..4c131d9eada5 100644 --- a/build-system/common/utils.js +++ b/build-system/common/utils.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const argv = require('minimist')(process.argv.slice(2)); const experimentsConfig = require('../global-configs/experiments-config.json'); const fs = require('fs-extra'); diff --git a/build-system/compile/build-constants.js b/build-system/compile/build-constants.js index dc7bedcbce34..d87e8804a048 100644 --- a/build-system/compile/build-constants.js +++ b/build-system/compile/build-constants.js @@ -1,18 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const argv = require('minimist')(process.argv.slice(2)); const {VERSION} = require('./internal-version'); diff --git a/build-system/compile/bundles.config.js b/build-system/compile/bundles.config.js index 729cccc3045b..d78788ff3116 100644 --- a/build-system/compile/bundles.config.js +++ b/build-system/compile/bundles.config.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const extensionBundles = require('./bundles.config.extensions.json'); const wrappers = require('./compile-wrappers'); diff --git a/build-system/compile/check-for-unknown-deps.js b/build-system/compile/check-for-unknown-deps.js index 1008216bd38e..b08547056061 100644 --- a/build-system/compile/check-for-unknown-deps.js +++ b/build-system/compile/check-for-unknown-deps.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const argv = require('minimist')(process.argv.slice(2)); diff --git a/build-system/compile/closure-compile.js b/build-system/compile/closure-compile.js index a59c11399ccb..f362bcf7b0f1 100644 --- a/build-system/compile/closure-compile.js +++ b/build-system/compile/closure-compile.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const compiler = require('@ampproject/google-closure-compiler'); diff --git a/build-system/compile/compile-wrappers.js b/build-system/compile/compile-wrappers.js index cfc93925dfa9..5f0ed7c6ec23 100644 --- a/build-system/compile/compile-wrappers.js +++ b/build-system/compile/compile-wrappers.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const {VERSION} = require('./internal-version'); // If there is a sync JS error during initial load, diff --git a/build-system/compile/compile.js b/build-system/compile/compile.js index 92fc1e37292f..0ae495a5ecfc 100644 --- a/build-system/compile/compile.js +++ b/build-system/compile/compile.js @@ -1,18 +1,3 @@ -/** - * Copyright 2015 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const argv = require('minimist')(process.argv.slice(2)); const del = require('del'); diff --git a/build-system/compile/debug-compilation-lifecycle.js b/build-system/compile/debug-compilation-lifecycle.js index b4bd8191ee68..c2a4b41bfe4d 100644 --- a/build-system/compile/debug-compilation-lifecycle.js +++ b/build-system/compile/debug-compilation-lifecycle.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const argv = require('minimist')(process.argv.slice(2)); const fs = require('fs'); diff --git a/build-system/compile/helpers.js b/build-system/compile/helpers.js index 2ac23bfe5402..82b9bf3b5107 100644 --- a/build-system/compile/helpers.js +++ b/build-system/compile/helpers.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const argv = require('minimist')(process.argv.slice(2)); diff --git a/build-system/compile/internal-version.js b/build-system/compile/internal-version.js index 64f5a93edc5f..6467038d19d9 100644 --- a/build-system/compile/internal-version.js +++ b/build-system/compile/internal-version.js @@ -1,18 +1,3 @@ -/** - * Copyright 2015 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const minimist = require('minimist'); diff --git a/build-system/compile/log-messages.js b/build-system/compile/log-messages.js index 92b49345691e..ef6260bc39b6 100644 --- a/build-system/compile/log-messages.js +++ b/build-system/compile/log-messages.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const argv = require('minimist')(process.argv.slice(2)); const fs = require('fs-extra'); const {cyan} = require('../common/colors'); diff --git a/build-system/compile/post-closure-babel.js b/build-system/compile/post-closure-babel.js index 976eac71ce48..d52e947aedec 100644 --- a/build-system/compile/post-closure-babel.js +++ b/build-system/compile/post-closure-babel.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const argv = require('minimist')(process.argv.slice(2)); const babel = require('@babel/core'); diff --git a/build-system/compile/pre-closure-babel.js b/build-system/compile/pre-closure-babel.js index 6f385e176209..cc63b207265e 100644 --- a/build-system/compile/pre-closure-babel.js +++ b/build-system/compile/pre-closure-babel.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const babel = require('@babel/core'); diff --git a/build-system/compile/sanitize.js b/build-system/compile/sanitize.js index 19dfe229d727..d34a5b1cbc82 100644 --- a/build-system/compile/sanitize.js +++ b/build-system/compile/sanitize.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const argv = require('minimist')(process.argv.slice(2)); diff --git a/build-system/compile/sources.js b/build-system/compile/sources.js index 1e25ae81ecce..8e19ddc383a8 100644 --- a/build-system/compile/sources.js +++ b/build-system/compile/sources.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @fileoverview This file contains all the globs required for babel * transformation and for closure compilation. Try and maintain the glob diff --git a/build-system/eslint-rules/.eslintrc.js b/build-system/eslint-rules/.eslintrc.js index deff6342c31d..2d02cb72b2e1 100644 --- a/build-system/eslint-rules/.eslintrc.js +++ b/build-system/eslint-rules/.eslintrc.js @@ -1,18 +1,4 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + module.exports = { 'plugins': ['eslint-plugin'], diff --git a/build-system/eslint-rules/always-call-chai-methods.js b/build-system/eslint-rules/always-call-chai-methods.js index 41889a4badbc..85a8b9be0ba7 100644 --- a/build-system/eslint-rules/always-call-chai-methods.js +++ b/build-system/eslint-rules/always-call-chai-methods.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // We need a full database of possible Chai assertions to figure out what to diff --git a/build-system/eslint-rules/await-expect.js b/build-system/eslint-rules/await-expect.js index 8e2eb02beffe..be30f7b5579b 100644 --- a/build-system/eslint-rules/await-expect.js +++ b/build-system/eslint-rules/await-expect.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/eslint-rules/closure-type-primitives.js b/build-system/eslint-rules/closure-type-primitives.js index e934768aaf6f..3f0aa0d5896d 100644 --- a/build-system/eslint-rules/closure-type-primitives.js +++ b/build-system/eslint-rules/closure-type-primitives.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const doctrine = require('@jridgewell/doctrine'); diff --git a/build-system/eslint-rules/dict-string-keys.js b/build-system/eslint-rules/dict-string-keys.js index d3c5c97b6a58..1c00f978bc09 100644 --- a/build-system/eslint-rules/dict-string-keys.js +++ b/build-system/eslint-rules/dict-string-keys.js @@ -1,18 +1,3 @@ -/** - * Copyright 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/forbidden-terms-config.js b/build-system/eslint-rules/forbidden-terms-config.js index 8e2256e61f70..552208539c21 100644 --- a/build-system/eslint-rules/forbidden-terms-config.js +++ b/build-system/eslint-rules/forbidden-terms-config.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const {readFileSync} = require('fs'); /** diff --git a/build-system/eslint-rules/get-mode-usage.js b/build-system/eslint-rules/get-mode-usage.js index bcbfd02fe3d2..ca459bbfdf13 100644 --- a/build-system/eslint-rules/get-mode-usage.js +++ b/build-system/eslint-rules/get-mode-usage.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // This rule asserts that we only grab properties from getMode(), and never diff --git a/build-system/eslint-rules/html-template.js b/build-system/eslint-rules/html-template.js index 708fefc42a49..fd033b1f384c 100644 --- a/build-system/eslint-rules/html-template.js +++ b/build-system/eslint-rules/html-template.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const { diff --git a/build-system/eslint-rules/index.js b/build-system/eslint-rules/index.js index 1501966595e7..8aad2b29f8d9 100644 --- a/build-system/eslint-rules/index.js +++ b/build-system/eslint-rules/index.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const fs = require('fs'); diff --git a/build-system/eslint-rules/is-experiment-on.js b/build-system/eslint-rules/is-experiment-on.js index 76b33c0eea95..5841e6fe313f 100644 --- a/build-system/eslint-rules/is-experiment-on.js +++ b/build-system/eslint-rules/is-experiment-on.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/json-configuration.js b/build-system/eslint-rules/json-configuration.js index 6a9af9c2d5a2..aad7f6573c4b 100644 --- a/build-system/eslint-rules/json-configuration.js +++ b/build-system/eslint-rules/json-configuration.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/eslint-rules/jss-animation-name.js b/build-system/eslint-rules/jss-animation-name.js index 291a55925ebb..15435c101ca1 100644 --- a/build-system/eslint-rules/jss-animation-name.js +++ b/build-system/eslint-rules/jss-animation-name.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/eslint-rules/no-array-destructuring.js b/build-system/eslint-rules/no-array-destructuring.js new file mode 100644 index 000000000000..929109b8b641 --- /dev/null +++ b/build-system/eslint-rules/no-array-destructuring.js @@ -0,0 +1,69 @@ +'use strict'; + +// Only allow array destructuring on preact functions that are known to return +// real arrays. This is to avoid the very large iterator polyfill and the very +// slow native and polyfilled runtime. +// +// Good: +// const [first] = useXYZ(0); +// const [x] = preact.useXYZ(0); +// +// Bad: +// const [b] = value; +// function bad([b]) {} +module.exports = function (context) { + /** + * @param {*} node + * @return {boolean} + */ + function isAllowed(node) { + const {parent} = node; + if (parent.type !== 'VariableDeclarator') { + return false; + } + const {init} = parent; + + if (!init || init.type !== 'CallExpression') { + return false; + } + + const {callee} = init; + + if (callee.type === 'Identifier') { + return callee.name.startsWith('use'); + } + + if (callee.type === 'MemberExpression') { + const {computed, object, property} = callee; + if (computed) { + return false; + } + if ( + object.type !== 'Identifier' || + object.name.toLowerCase() !== 'preact' + ) { + return false; + } + if (property.type !== 'Identifier' || !property.name.startsWith('use')) { + return false; + } + return true; + } + + return false; + } + + return { + ArrayPattern: function (node) { + if (isAllowed(node)) { + return; + } + + context.report({ + node, + message: + 'Array Destructuring is only allowed on known array-returning preact hooks', + }); + }, + }; +}; diff --git a/build-system/eslint-rules/no-arrow-on-register-functions.js b/build-system/eslint-rules/no-arrow-on-register-functions.js index 1e65537e5071..b48ede2ad741 100644 --- a/build-system/eslint-rules/no-arrow-on-register-functions.js +++ b/build-system/eslint-rules/no-arrow-on-register-functions.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const expression = [ diff --git a/build-system/eslint-rules/no-bigint.js b/build-system/eslint-rules/no-bigint.js index 73ab637f2c1d..0050660c6d9f 100644 --- a/build-system/eslint-rules/no-bigint.js +++ b/build-system/eslint-rules/no-bigint.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/no-deep-destructuring.js b/build-system/eslint-rules/no-deep-destructuring.js index 92c31affb1c1..06b034fc79e2 100644 --- a/build-system/eslint-rules/no-deep-destructuring.js +++ b/build-system/eslint-rules/no-deep-destructuring.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/eslint-rules/no-duplicate-import.js b/build-system/eslint-rules/no-duplicate-import.js index a32c4b40f0a9..785374dc6b15 100644 --- a/build-system/eslint-rules/no-duplicate-import.js +++ b/build-system/eslint-rules/no-duplicate-import.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // Enforces imports statements from a module are not duplicated diff --git a/build-system/eslint-rules/no-duplicate-name-typedef.js b/build-system/eslint-rules/no-duplicate-name-typedef.js index 2db0b1b65090..ebf2814c6f20 100644 --- a/build-system/eslint-rules/no-duplicate-name-typedef.js +++ b/build-system/eslint-rules/no-duplicate-name-typedef.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // Global cache of typedefName: typedefLocation. diff --git a/build-system/eslint-rules/no-dynamic-import.js b/build-system/eslint-rules/no-dynamic-import.js index 777545f9c1ab..dcd75ac6bc02 100644 --- a/build-system/eslint-rules/no-dynamic-import.js +++ b/build-system/eslint-rules/no-dynamic-import.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/no-es2015-number-props.js b/build-system/eslint-rules/no-es2015-number-props.js index c8e6cdd1d167..a2d5d75f38aa 100644 --- a/build-system/eslint-rules/no-es2015-number-props.js +++ b/build-system/eslint-rules/no-es2015-number-props.js @@ -1,18 +1,3 @@ -/** - * Copyright 2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const INVALID_PROPS = [ diff --git a/build-system/eslint-rules/no-export-side-effect.js b/build-system/eslint-rules/no-export-side-effect.js index b843124cef50..391ece7d900e 100644 --- a/build-system/eslint-rules/no-export-side-effect.js +++ b/build-system/eslint-rules/no-export-side-effect.js @@ -1,18 +1,3 @@ -/** - * Copyright 2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/no-forbidden-terms.js b/build-system/eslint-rules/no-forbidden-terms.js index 2bc32abbb29b..d5e584d582cc 100644 --- a/build-system/eslint-rules/no-forbidden-terms.js +++ b/build-system/eslint-rules/no-forbidden-terms.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const {cyan} = require('../common/colors'); const {matchForbiddenTerms} = require('../test-configs/forbidden-terms'); const {relative} = require('path'); diff --git a/build-system/eslint-rules/no-function-async.js b/build-system/eslint-rules/no-function-async.js index 85d82eec8e2a..d958f3c7db9c 100644 --- a/build-system/eslint-rules/no-function-async.js +++ b/build-system/eslint-rules/no-function-async.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/no-function-generator.js b/build-system/eslint-rules/no-function-generator.js index 453d448ee3c6..258ee4bb0109 100644 --- a/build-system/eslint-rules/no-function-generator.js +++ b/build-system/eslint-rules/no-function-generator.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/no-global.js b/build-system/eslint-rules/no-global.js index 690c6d6b4212..ac9af4dd9235 100644 --- a/build-system/eslint-rules/no-global.js +++ b/build-system/eslint-rules/no-global.js @@ -1,18 +1,3 @@ -/** - * Copyright 2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const astUtils = require('eslint/lib/rules/utils/ast-utils'); diff --git a/build-system/eslint-rules/no-has-own-property-method.js b/build-system/eslint-rules/no-has-own-property-method.js index 242ad20295a9..eed1a8e8368a 100644 --- a/build-system/eslint-rules/no-has-own-property-method.js +++ b/build-system/eslint-rules/no-has-own-property-method.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = { diff --git a/build-system/eslint-rules/no-import-meta.js b/build-system/eslint-rules/no-import-meta.js index 797207dd071b..11018c0b1e1a 100644 --- a/build-system/eslint-rules/no-import-meta.js +++ b/build-system/eslint-rules/no-import-meta.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/no-import-rename.js b/build-system/eslint-rules/no-import-rename.js index 8129a1da0373..dc32bb10a6e6 100644 --- a/build-system/eslint-rules/no-import-rename.js +++ b/build-system/eslint-rules/no-import-rename.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const path = require('path'); diff --git a/build-system/eslint-rules/no-import.js b/build-system/eslint-rules/no-import.js index 8921345a50ec..b1b635ada028 100644 --- a/build-system/eslint-rules/no-import.js +++ b/build-system/eslint-rules/no-import.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const imports = [ diff --git a/build-system/eslint-rules/no-invalid-this.js b/build-system/eslint-rules/no-invalid-this.js index ec4e2c82f915..1d21c41f346b 100644 --- a/build-system/eslint-rules/no-invalid-this.js +++ b/build-system/eslint-rules/no-invalid-this.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // Disables use of the `this` value when we suspect that it is using the diff --git a/build-system/eslint-rules/no-log-array.js b/build-system/eslint-rules/no-log-array.js index b53386e9c40a..f0b12852cca3 100644 --- a/build-system/eslint-rules/no-log-array.js +++ b/build-system/eslint-rules/no-log-array.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const { assertAliases, definitionFile, diff --git a/build-system/eslint-rules/no-mixed-interpolation.js b/build-system/eslint-rules/no-mixed-interpolation.js index ce45d062d450..d5c51d8bc802 100644 --- a/build-system/eslint-rules/no-mixed-interpolation.js +++ b/build-system/eslint-rules/no-mixed-interpolation.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - const { assertAliases, definitionFile, diff --git a/build-system/eslint-rules/no-mixed-operators.js b/build-system/eslint-rules/no-mixed-operators.js index 6b1d249399c9..ee89504c8fe0 100644 --- a/build-system/eslint-rules/no-mixed-operators.js +++ b/build-system/eslint-rules/no-mixed-operators.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = { diff --git a/build-system/eslint-rules/no-module-exports.js b/build-system/eslint-rules/no-module-exports.js index 2c7bcfa3a887..cac307e6ea17 100644 --- a/build-system/eslint-rules/no-module-exports.js +++ b/build-system/eslint-rules/no-module-exports.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - 'use strict'; //------------------------------------------------------------------------------ diff --git a/build-system/eslint-rules/no-private-props.js b/build-system/eslint-rules/no-private-props.js index 4772bf69552d..f6d312e1b7ec 100644 --- a/build-system/eslint-rules/no-private-props.js +++ b/build-system/eslint-rules/no-private-props.js @@ -1,18 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/eslint-rules/no-rest.js b/build-system/eslint-rules/no-rest.js new file mode 100644 index 000000000000..9a47c4c2e21f --- /dev/null +++ b/build-system/eslint-rules/no-rest.js @@ -0,0 +1,25 @@ +'use strict'; + +// Forbids use of Rest elements when they require an iterator polyfill, or +// there's no clear benefit. +// +// Good: +// ``` +// function foo(...args) {} +// const {...rest} = {foo: 1}; +// ``` +// +// Bad: +// ``` +// const [...rest] = [1, 2, 3]; +// ``` +module.exports = function (context) { + return { + 'ArrayPattern > RestElement': function (node) { + context.report({ + node, + message: 'Collecting elements using a rest element is not allowed.', + }); + }, + }; +}; diff --git a/build-system/eslint-rules/no-spread.js b/build-system/eslint-rules/no-spread.js new file mode 100644 index 000000000000..ce420d2ff81d --- /dev/null +++ b/build-system/eslint-rules/no-spread.js @@ -0,0 +1,25 @@ +'use strict'; + +// Forbids use of Spread elements when they require an iterator polyfill +// +// Good: +// ``` +// const obj = {foo: 1, ...obj}; +// ``` +// +// Bad: +// ``` +// const args = [1, 2, 3, ...array]; +// bar(...args); +// ``` +module.exports = function (context) { + return { + 'ArrayExpression > SpreadElement': function (node) { + context.report({node, message: 'Iterator spreading is not allowed.'}); + }, + + 'CallExpression > SpreadElement': function (node) { + context.report({node, message: 'Iterator spreading is not allowed.'}); + }, + }; +}; diff --git a/build-system/eslint-rules/no-static-this.js b/build-system/eslint-rules/no-static-this.js index ae49eb360cf4..570c5a3e4e64 100644 --- a/build-system/eslint-rules/no-static-this.js +++ b/build-system/eslint-rules/no-static-this.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // Forbids use of `this` inside static class methods diff --git a/build-system/eslint-rules/no-style-display.js b/build-system/eslint-rules/no-style-display.js index 44ee933867e7..54641d1d6d0b 100644 --- a/build-system/eslint-rules/no-style-display.js +++ b/build-system/eslint-rules/no-style-display.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/no-style-property-setting.js b/build-system/eslint-rules/no-style-property-setting.js index 01e7aec0fbcf..b2681cfac012 100644 --- a/build-system/eslint-rules/no-style-property-setting.js +++ b/build-system/eslint-rules/no-style-property-setting.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const path = require('path'); diff --git a/build-system/eslint-rules/no-swallow-return-from-allow-console-error.js b/build-system/eslint-rules/no-swallow-return-from-allow-console-error.js index 2a2595914ab9..8303321ec010 100644 --- a/build-system/eslint-rules/no-swallow-return-from-allow-console-error.js +++ b/build-system/eslint-rules/no-swallow-return-from-allow-console-error.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = { diff --git a/build-system/eslint-rules/no-unload-listener.js b/build-system/eslint-rules/no-unload-listener.js index 33b2cbaa39d0..3197adac3096 100644 --- a/build-system/eslint-rules/no-unload-listener.js +++ b/build-system/eslint-rules/no-unload-listener.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/objstr-literal.js b/build-system/eslint-rules/objstr-literal.js index 8234480200b0..9e486df79ad5 100644 --- a/build-system/eslint-rules/objstr-literal.js +++ b/build-system/eslint-rules/objstr-literal.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - module.exports = function objstrLiteral(context) { return { CallExpression(node) { diff --git a/build-system/eslint-rules/preact.js b/build-system/eslint-rules/preact.js index a9638dd38030..b4f9e33f77a2 100644 --- a/build-system/eslint-rules/preact.js +++ b/build-system/eslint-rules/preact.js @@ -1,18 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const path = require('path'); diff --git a/build-system/eslint-rules/prefer-deferred-promise.js b/build-system/eslint-rules/prefer-deferred-promise.js index 0df568215eeb..1f5d7d9f81c1 100644 --- a/build-system/eslint-rules/prefer-deferred-promise.js +++ b/build-system/eslint-rules/prefer-deferred-promise.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/prefer-destructuring.js b/build-system/eslint-rules/prefer-destructuring.js index 79760201335c..05a98042bce7 100644 --- a/build-system/eslint-rules/prefer-destructuring.js +++ b/build-system/eslint-rules/prefer-destructuring.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = { diff --git a/build-system/eslint-rules/prefer-spread-props.js b/build-system/eslint-rules/prefer-spread-props.js index bf45e0b29723..e02149e03248 100644 --- a/build-system/eslint-rules/prefer-spread-props.js +++ b/build-system/eslint-rules/prefer-spread-props.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // This warns when using Object.assign where an object spread is better. Note diff --git a/build-system/eslint-rules/prefer-unnested-spread-objects.js b/build-system/eslint-rules/prefer-unnested-spread-objects.js index 0d7f6c59652b..3197d8dfa512 100644 --- a/build-system/eslint-rules/prefer-unnested-spread-objects.js +++ b/build-system/eslint-rules/prefer-unnested-spread-objects.js @@ -1,18 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; // Disallows using an object spread on an inline object expression. Instead, diff --git a/build-system/eslint-rules/private-prop-names.js b/build-system/eslint-rules/private-prop-names.js index 7fbf9da26614..c326b825be00 100644 --- a/build-system/eslint-rules/private-prop-names.js +++ b/build-system/eslint-rules/private-prop-names.js @@ -1,18 +1,3 @@ -/** - * Copyright 2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; /** diff --git a/build-system/eslint-rules/query-selector.js b/build-system/eslint-rules/query-selector.js index 6808bc735dc2..be04019f3ff2 100644 --- a/build-system/eslint-rules/query-selector.js +++ b/build-system/eslint-rules/query-selector.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; const cssWhat = require('css-what'); diff --git a/build-system/eslint-rules/todo-format.js b/build-system/eslint-rules/todo-format.js index b57c39c4f22a..67b6118353ea 100644 --- a/build-system/eslint-rules/todo-format.js +++ b/build-system/eslint-rules/todo-format.js @@ -1,18 +1,3 @@ -/** - * Copyright 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/unused-private-field.js b/build-system/eslint-rules/unused-private-field.js index c63215294da6..43b0a44c7a45 100644 --- a/build-system/eslint-rules/unused-private-field.js +++ b/build-system/eslint-rules/unused-private-field.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = { diff --git a/build-system/eslint-rules/vsync.js b/build-system/eslint-rules/vsync.js index 5a875e873ed1..8ddce819c73b 100644 --- a/build-system/eslint-rules/vsync.js +++ b/build-system/eslint-rules/vsync.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ 'use strict'; module.exports = function (context) { diff --git a/build-system/eslint-rules/window-property-name.js b/build-system/eslint-rules/window-property-name.js index 3bda1f4573fc..52e2dce53837 100644 --- a/build-system/eslint-rules/window-property-name.js +++ b/build-system/eslint-rules/window-property-name.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @fileoverview * Checks that custom properties set on the window are prefixed with '__AMP_'. diff --git a/build-system/externs/amp.extern.js b/build-system/externs/amp.extern.js index 41a37001eb35..d93bcf2829b4 100644 --- a/build-system/externs/amp.extern.js +++ b/build-system/externs/amp.extern.js @@ -1,19 +1,3 @@ -/** - * Copyright 2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** @externs */ /** diff --git a/build-system/externs/dompurify.extern.js b/build-system/externs/dompurify.extern.js index 648eaae6b09a..1a34e4432797 100644 --- a/build-system/externs/dompurify.extern.js +++ b/build-system/externs/dompurify.extern.js @@ -1,19 +1,3 @@ -/** - * Copyright 2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** @externs */ /** @constructor */ diff --git a/build-system/externs/layout-jank.extern.js b/build-system/externs/layout-jank.extern.js index 938242a3d6c8..170e3774fbb1 100644 --- a/build-system/externs/layout-jank.extern.js +++ b/build-system/externs/layout-jank.extern.js @@ -1,19 +1,3 @@ -/** - * Copyright 2019 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @fileoverview Definitions for the Layout Jank API. * diff --git a/build-system/externs/preact.extern.js b/build-system/externs/preact.extern.js index 1a435e13777e..35d1bf8cf85f 100644 --- a/build-system/externs/preact.extern.js +++ b/build-system/externs/preact.extern.js @@ -1,19 +1,3 @@ -/** - * Copyright 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** @externs */ /** @const */ diff --git a/build-system/npm-publish/build-npm-binaries.js b/build-system/npm-publish/build-npm-binaries.js index a8ab9b87a85d..66fc56dec898 100644 --- a/build-system/npm-publish/build-npm-binaries.js +++ b/build-system/npm-publish/build-npm-binaries.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @fileoverview * Builds npm binaries for specified Bento components. diff --git a/build-system/npm-publish/get-extensions.js b/build-system/npm-publish/get-extensions.js index fd277d41ccbe..0ed317bc7ab4 100644 --- a/build-system/npm-publish/get-extensions.js +++ b/build-system/npm-publish/get-extensions.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @fileoverview * Logs Bento components to publish. diff --git a/build-system/npm-publish/utils.js b/build-system/npm-publish/utils.js index e2b3d4ffe894..7b622c9318d9 100644 --- a/build-system/npm-publish/utils.js +++ b/build-system/npm-publish/utils.js @@ -1,19 +1,3 @@ -/** - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Get extensions to be published on npm * @return {Array