Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add consistent copyright notice + use strict to all JS+TS files #15917

Merged
merged 7 commits into from
May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

/// <reference path="./types.d.ts"/>
import { CompatData } from './types';

Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const fs = require('fs');
const path = require('path');

Expand Down
5 changes: 2 additions & 3 deletions scripts/compare-features.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

Expand Down
6 changes: 3 additions & 3 deletions scripts/compare-features.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const assert = require('assert').strict;

const compareFeatures = require('./compare-features');
Expand Down
5 changes: 5 additions & 0 deletions scripts/diff-features.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const { execSync } = require('child_process');
const fs = require('fs');

Expand Down
5 changes: 5 additions & 0 deletions scripts/enumerate-features.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const yargs = require('yargs');

const fs = require('fs');
Expand Down
8 changes: 4 additions & 4 deletions scripts/fix-browser-order.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

/**
* Return a new "support_block" object whose first-level properties
Expand All @@ -15,7 +16,6 @@
* @returns {*} The new value
*/

'use strict';
const fs = require('fs');
const path = require('path');
const { platform } = require('os');
Expand Down
8 changes: 4 additions & 4 deletions scripts/fix-feature-order.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

/**
* Return a new feature object whose first-level properties have been
Expand All @@ -15,7 +16,6 @@
* @returns {*} The new value
*/

'use strict';
const fs = require('fs');
const path = require('path');
const { platform } = require('os');
Expand Down
4 changes: 4 additions & 0 deletions scripts/fix.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const fs = require('fs');
const path = require('path');
const fixBrowserOrder = require('./fix-browser-order');
Expand Down
5 changes: 2 additions & 3 deletions scripts/migrations/001-sort-features.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

Expand Down
6 changes: 3 additions & 3 deletions scripts/migrations/002-remove-webview-flags.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const fs = require('fs');
const path = require('path');
const { platform } = require('os');
Expand Down
6 changes: 3 additions & 3 deletions scripts/migrations/002-remove-webview-flags.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const assert = require('assert').strict;

const { removeWebViewFlags } = require('./002-remove-webview-flags.js');
Expand Down
5 changes: 2 additions & 3 deletions scripts/migrations/003-sort-features.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

Expand Down
5 changes: 2 additions & 3 deletions scripts/migrations/004-prettify.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

Expand Down
8 changes: 4 additions & 4 deletions scripts/mirror.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

/**
* @typedef {import('../types').Identifier} Identifier
* @typedef {import('../types').SupportStatement} SupportStatement
* @typedef {import('../types').ReleaseStatement} ReleaseStatement
*/

'use strict';
const fs = require('fs');
const path = require('path');

Expand Down
3 changes: 3 additions & 0 deletions scripts/release-build.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const fs = require('fs').promises;
Expand Down
4 changes: 4 additions & 0 deletions scripts/release-build.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const assert = require('assert').strict;
const { execSync } = require('child_process');

Expand Down
5 changes: 5 additions & 0 deletions scripts/release-notes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const {
exec,
releaseYargsBuilder,
Expand Down
5 changes: 5 additions & 0 deletions scripts/release-pulls.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const {
buildQuery,
getRefDate,
Expand Down
5 changes: 5 additions & 0 deletions scripts/release-stats.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const http = require('https');
const readline = require('readline');
const { exec, releaseYargsBuilder } = require('./release-utils');
Expand Down
5 changes: 5 additions & 0 deletions scripts/release-utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const { execSync } = require('child_process');

function exec(command) {
Expand Down
6 changes: 3 additions & 3 deletions scripts/statistics.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const chalk = require('chalk');

const bcd = require('..');
Expand Down
4 changes: 4 additions & 0 deletions scripts/traverse.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const bcd = require('..');

const { argv } = require('yargs').command(
Expand Down
4 changes: 4 additions & 0 deletions test/lint.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const fs = require('fs');
const path = require('path');
const ora = require('ora');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const testBrowsersData = require('./test-browsers-data.js');
const testBrowsersPresence = require('./test-browsers-presence.js');
const { testConsistency } = require('./test-consistency.js');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-browsers-data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const path = require('path');
const chalk = require('chalk');
const { Logger } = require('./utils.js');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-browsers-presence.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const path = require('path');
const chalk = require('chalk');
const { Logger } = require('./utils.js');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-consistency.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const compareVersions = require('compare-versions');
const chalk = require('chalk');

Expand Down
5 changes: 5 additions & 0 deletions test/linter/test-consistency.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const assert = require('assert').strict;

const { ConsistencyChecker } = require('./test-consistency');
Expand Down
5 changes: 5 additions & 0 deletions test/linter/test-descriptions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const chalk = require('chalk');
const { Logger } = require('./utils.js');

Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-links.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const fs = require('fs');
const url = require('url');
const chalk = require('chalk');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-prefix.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const path = require('path');
const chalk = require('chalk');

Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-real-values.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const path = require('path');
const chalk = require('chalk');
const { Logger } = require('./utils.js');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-schema.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const Ajv = require('ajv').default;
const ajvErrors = require('ajv-errors');
const addFormats = require('ajv-formats');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-style.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const fs = require('fs');
const chalk = require('chalk');
const { IS_WINDOWS, indexToPos, jsonDiff } = require('../utils.js');
Expand Down
4 changes: 4 additions & 0 deletions test/linter/test-versions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const compareVersions = require('compare-versions');
const chalk = require('chalk');
const { Logger } = require('./utils.js');
Expand Down
5 changes: 5 additions & 0 deletions test/linter/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const chalk = require('chalk');

/** @type {string[]} */
Expand Down
4 changes: 4 additions & 0 deletions test/spec-urls.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const assert = require('assert').strict;
const specData = require('browser-specs');
const { walk } = require('../utils');
Expand Down
4 changes: 4 additions & 0 deletions test/test-regexes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const assert = require('assert').strict;

/**
Expand Down
4 changes: 4 additions & 0 deletions test/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

'use strict';

const { platform } = require('os');
const chalk = require('chalk');

Expand Down
Loading