Ensure blank line after copyright header

This commit is contained in:
Joe Savona
2023-04-05 13:42:27 -07:00
parent 801e4258cf
commit 1650d8fef2
11 changed files with 16 additions and 4 deletions
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const nextConfig = {
reactStrictMode: true,
}
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const nextConfig = {
reactStrictMode: true,
webpack: (config) => {
+6 -4
View File
@@ -4,17 +4,19 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
const fs = require("fs");
const glob = require("glob");
const META_COPYRIGHT_COMMENT_BLOCK = `/**
const META_COPYRIGHT_COMMENT_BLOCK =
`/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/`;
*/`.trim() + "\n\n";
const files = glob.sync("**/*.{js,ts,tsx,jsx}", {
ignore: [
@@ -55,9 +57,9 @@ function processFile(file) {
return null;
}
if (/^\/\*\*/.test(source)) {
source = source.replace(/\/\*\*[^\/]+\//, META_COPYRIGHT_COMMENT_BLOCK);
source = source.replace(/\/\*\*[^\/]+\/\s+/, META_COPYRIGHT_COMMENT_BLOCK);
} else {
source = `${META_COPYRIGHT_COMMENT_BLOCK}\n\n${source}`;
source = `${META_COPYRIGHT_COMMENT_BLOCK}${source}`;
}
return source;
}
+1
View File
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
// Based on similar script in React
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
const execFileSync = require("child_process").execFileSync;
+1
View File
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { NodePath } from "@babel/traverse";
import * as t from "@babel/types";
import {
+1
View File
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import invariant from "invariant";
import { Effect } from "./HIR";
import {
+1
View File
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import invariant from "invariant";
import { Hook } from "./Hooks";
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { HIRFunction, Identifier } from "../HIR/HIR";
import DisjointSet from "../Utils/DisjointSet";
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {
Effect,
HIRFunction,
+1
View File
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export { default as BabelPlugin } from "./Babel/BabelPlugin";
export {
CompilerError,