diff --git a/.eslintrc.js b/.eslintrc.js index 9fa356d15..c7547c894 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const restrictedGlobals = require('eslint-restricted-globals'); module.exports = { @@ -37,6 +35,7 @@ module.exports = { }, ], 'import/no-unresolved': [2, { ignore: ['^carbon-web-components/es/icons/'] }], + 'max-classes-per-file': 0, }, settings: { 'import/resolver': { diff --git a/.storybook/addon-carbon-theme/index.js b/.storybook/addon-carbon-theme/index.js index 6850d8510..bb2bb277c 100644 --- a/.storybook/addon-carbon-theme/index.js +++ b/.storybook/addon-carbon-theme/index.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - function managerEntries(entry = []) { return [...entry, require.resolve('./register.tsx')]; } diff --git a/.storybook/addon-knobs-args/index.js b/.storybook/addon-knobs-args/index.js index a1f4e7f50..191dc03eb 100644 --- a/.storybook/addon-knobs-args/index.js +++ b/.storybook/addon-knobs-args/index.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - function config(entry = []) { return [...entry, require.resolve('./decorators.ts')]; } diff --git a/.storybook/angular/main.js b/.storybook/angular/main.js index d23c10f99..da53f13f5 100644 --- a/.storybook/angular/main.js +++ b/.storybook/angular/main.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const deepReplace = require('../../tools/deep-replace'); const { addons, managerWebpack, webpackFinal } = require('../main'); diff --git a/.storybook/main.js b/.storybook/main.js index ee957bdd7..3890c65ef 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const sass = require('sass'); const rtlcss = require('rtlcss'); diff --git a/.storybook/react/main.js b/.storybook/react/main.js index fc8da0682..ff6081d84 100644 --- a/.storybook/react/main.js +++ b/.storybook/react/main.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const { readFile, writeFile } = require('fs'); const path = require('path'); const { promisify } = require('util'); diff --git a/.storybook/vue/main.js b/.storybook/vue/main.js index 82fb9b204..78f54aa71 100644 --- a/.storybook/vue/main.js +++ b/.storybook/vue/main.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const deepReplace = require('../../tools/deep-replace'); const { addons, managerWebpack, webpackFinal } = require('../main'); diff --git a/.yarn/offline-mirror/eslint-config-airbnb-base-13.2.0.tgz b/.yarn/offline-mirror/eslint-config-airbnb-base-13.2.0.tgz deleted file mode 100644 index 2aac24908..000000000 Binary files a/.yarn/offline-mirror/eslint-config-airbnb-base-13.2.0.tgz and /dev/null differ diff --git a/.yarn/offline-mirror/eslint-config-airbnb-base-14.2.1.tgz b/.yarn/offline-mirror/eslint-config-airbnb-base-14.2.1.tgz new file mode 100644 index 000000000..bff4693c2 Binary files /dev/null and b/.yarn/offline-mirror/eslint-config-airbnb-base-14.2.1.tgz differ diff --git a/examples/codesandbox/basic/webpack.config.js b/examples/codesandbox/basic/webpack.config.js index 0ad8ce2c3..f0b3da91e 100644 --- a/examples/codesandbox/basic/webpack.config.js +++ b/examples/codesandbox/basic/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { diff --git a/examples/codesandbox/form/basic/webpack.config.js b/examples/codesandbox/form/basic/webpack.config.js index 0ad8ce2c3..f0b3da91e 100644 --- a/examples/codesandbox/form/basic/webpack.config.js +++ b/examples/codesandbox/form/basic/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { diff --git a/examples/codesandbox/form/redux-form/webpack.config.js b/examples/codesandbox/form/redux-form/webpack.config.js index 252167a06..09a15b0e0 100644 --- a/examples/codesandbox/form/redux-form/webpack.config.js +++ b/examples/codesandbox/form/redux-form/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { diff --git a/examples/codesandbox/ie/webpack.config.js b/examples/codesandbox/ie/webpack.config.js index 692a6f0b4..7063d56df 100644 --- a/examples/codesandbox/ie/webpack.config.js +++ b/examples/codesandbox/ie/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); diff --git a/examples/codesandbox/react-ssr/app.js b/examples/codesandbox/react-ssr/app.js index d98dcf6eb..76d07dbd6 100644 --- a/examples/codesandbox/react-ssr/app.js +++ b/examples/codesandbox/react-ssr/app.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const express = require('express'); const webpack = require('webpack'); const webpackDevMiddleware = require('webpack-dev-middleware'); diff --git a/examples/codesandbox/react-ssr/webpack.config.js b/examples/codesandbox/react-ssr/webpack.config.js index edc9882da..dfaa15d32 100644 --- a/examples/codesandbox/react-ssr/webpack.config.js +++ b/examples/codesandbox/react-ssr/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - module.exports = { module: { rules: [ diff --git a/examples/codesandbox/react/webpack.config.js b/examples/codesandbox/react/webpack.config.js index 252167a06..09a15b0e0 100644 --- a/examples/codesandbox/react/webpack.config.js +++ b/examples/codesandbox/react/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { diff --git a/examples/codesandbox/rtl/webpack.config.js b/examples/codesandbox/rtl/webpack.config.js index 318dd2d8b..45b1e7a31 100644 --- a/examples/codesandbox/rtl/webpack.config.js +++ b/examples/codesandbox/rtl/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const webpack = require('webpack'); const acceptLanguageParser = require('accept-language-parser'); diff --git a/examples/codesandbox/styling/custom-style/webpack.config.js b/examples/codesandbox/styling/custom-style/webpack.config.js index 0ad8ce2c3..f0b3da91e 100644 --- a/examples/codesandbox/styling/custom-style/webpack.config.js +++ b/examples/codesandbox/styling/custom-style/webpack.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { diff --git a/examples/codesandbox/styling/theme-zoning/webpack.config.js b/examples/codesandbox/styling/theme-zoning/webpack.config.js index f9ef6087c..fe541a3a7 100644 --- a/examples/codesandbox/styling/theme-zoning/webpack.config.js +++ b/examples/codesandbox/styling/theme-zoning/webpack.config.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const sass = require('sass'); const autoprefixer = require('autoprefixer'); const HtmlWebpackPlugin = require('html-webpack-plugin'); diff --git a/gulp-tasks/build.js b/gulp-tasks/build.js index 85a674577..ad6cb2e60 100644 --- a/gulp-tasks/build.js +++ b/gulp-tasks/build.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const gulp = require('gulp'); require('./build/dist'); require('./build/modules'); diff --git a/gulp-tasks/build/dist.js b/gulp-tasks/build/dist.js index d9f29d7d0..5fca89823 100644 --- a/gulp-tasks/build/dist.js +++ b/gulp-tasks/build/dist.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const fs = require('fs'); const gulp = require('gulp'); const path = require('path'); diff --git a/gulp-tasks/build/modules.js b/gulp-tasks/build/modules.js index 74654a492..e12727bc3 100644 --- a/gulp-tasks/build/modules.js +++ b/gulp-tasks/build/modules.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const gulp = require('gulp'); require('./modules/css'); require('./modules/icon-types'); diff --git a/gulp-tasks/build/modules/css.js b/gulp-tasks/build/modules/css.js index e741529ab..6e092e784 100644 --- a/gulp-tasks/build/modules/css.js +++ b/gulp-tasks/build/modules/css.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const autoprefixer = require('autoprefixer'); const cleanCSS = require('gulp-clean-css'); diff --git a/gulp-tasks/build/modules/icon-types.js b/gulp-tasks/build/modules/icon-types.js index 551cd36bf..b74fddbbf 100644 --- a/gulp-tasks/build/modules/icon-types.js +++ b/gulp-tasks/build/modules/icon-types.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const gulp = require('gulp'); const header = require('gulp-header'); diff --git a/gulp-tasks/build/modules/icons.js b/gulp-tasks/build/modules/icons.js index 3637bf573..8bb081a92 100644 --- a/gulp-tasks/build/modules/icons.js +++ b/gulp-tasks/build/modules/icons.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const gulp = require('gulp'); const header = require('gulp-header'); diff --git a/gulp-tasks/build/modules/react-defs.js b/gulp-tasks/build/modules/react-defs.js index c56d162dd..9ea0147bf 100644 --- a/gulp-tasks/build/modules/react-defs.js +++ b/gulp-tasks/build/modules/react-defs.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const babel = require('gulp-babel'); const gulp = require('gulp'); diff --git a/gulp-tasks/build/modules/react-types.js b/gulp-tasks/build/modules/react-types.js index b4278f4fc..7b18a4be9 100644 --- a/gulp-tasks/build/modules/react-types.js +++ b/gulp-tasks/build/modules/react-types.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const babel = require('gulp-babel'); const gulp = require('gulp'); diff --git a/gulp-tasks/build/modules/react.js b/gulp-tasks/build/modules/react.js index 636072dc1..56a63e2c7 100644 --- a/gulp-tasks/build/modules/react.js +++ b/gulp-tasks/build/modules/react.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const gulp = require('gulp'); const babel = require('gulp-babel'); diff --git a/gulp-tasks/build/modules/scripts-node.js b/gulp-tasks/build/modules/scripts-node.js index fba3f0f71..4c779fd86 100644 --- a/gulp-tasks/build/modules/scripts-node.js +++ b/gulp-tasks/build/modules/scripts-node.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const babel = require('gulp-babel'); const filter = require('gulp-filter'); diff --git a/gulp-tasks/build/modules/scripts.js b/gulp-tasks/build/modules/scripts.js index 19b5ce798..692ae1569 100644 --- a/gulp-tasks/build/modules/scripts.js +++ b/gulp-tasks/build/modules/scripts.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const babel = require('gulp-babel'); const filter = require('gulp-filter'); const gulp = require('gulp'); diff --git a/gulp-tasks/build/modules/types.js b/gulp-tasks/build/modules/types.js index a30aa057b..9d5ea37bc 100644 --- a/gulp-tasks/build/modules/types.js +++ b/gulp-tasks/build/modules/types.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const gulp = require('gulp'); const path = require('path'); const sourcemaps = require('gulp-sourcemaps'); diff --git a/gulp-tasks/build/sass.js b/gulp-tasks/build/sass.js index b34192934..dc3802eef 100644 --- a/gulp-tasks/build/sass.js +++ b/gulp-tasks/build/sass.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const gulp = require('gulp'); const config = require('../config'); diff --git a/gulp-tasks/clean.js b/gulp-tasks/clean.js index 3f3a4e5f9..33dabb2c9 100644 --- a/gulp-tasks/clean.js +++ b/gulp-tasks/clean.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const del = require('del'); const gulp = require('gulp'); const config = require('./config'); diff --git a/gulp-tasks/config.js b/gulp-tasks/config.js index 82a78342b..414494809 100644 --- a/gulp-tasks/config.js +++ b/gulp-tasks/config.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const commander = require('commander'); diff --git a/gulp-tasks/lint.js b/gulp-tasks/lint.js index 6a89d2b39..452619da1 100644 --- a/gulp-tasks/lint.js +++ b/gulp-tasks/lint.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const asyncDone = require('async-done'); const excludeGitignore = require('gulp-exclude-gitignore'); const filter = require('gulp-filter'); diff --git a/gulp-tasks/test.js b/gulp-tasks/test.js index 9b13ab6f5..4a70b5834 100644 --- a/gulp-tasks/test.js +++ b/gulp-tasks/test.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const gulp = require('gulp'); const path = require('path'); const { Server } = require('karma'); diff --git a/gulpfile.js b/gulpfile.js index b83335193..41bb02147 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - require('./gulp-tasks/build'); require('./gulp-tasks/clean'); require('./gulp-tasks/lint'); diff --git a/package.json b/package.json index 0dd7b72a8..53e2b9270 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "del": "^4.1.1", "es6-promise": "^4.2.8", "eslint": "^7.32.0", - "eslint-config-airbnb-base": "^13.2.0", + "eslint-config-airbnb-base": "^14.2.1", "eslint-config-carbon-base": "^1.0.1", "eslint-config-prettier": "^7.2.0", "eslint-import-resolver-node": "~0.3.6", diff --git a/src/components/date-picker/range-plugin.ts b/src/components/date-picker/range-plugin.ts index 75e6e2d17..11a61cde7 100644 --- a/src/components/date-picker/range-plugin.ts +++ b/src/components/date-picker/range-plugin.ts @@ -1,7 +1,7 @@ /** * @license * - * Copyright IBM Corp. 2019 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -30,7 +30,7 @@ import { Plugin } from 'flatpickr/dist/types/options'; * Without that, Flatpickr clears the `` when end date hasn't been selected yet (which we don't want). */ export default (config: Config): Plugin => { - const factory = rangePlugin(Object.assign({ position: 'left' }, config)); + const factory = rangePlugin({ position: 'left', ...config }); return (fp: FlatpickrInstance) => { const origRangePlugin = factory(fp); const { onReady: origOnReady } = origRangePlugin; diff --git a/src/components/modal/modal-story-react.tsx b/src/components/modal/modal-story-react.tsx index 7ec1bb499..3406117bf 100644 --- a/src/components/modal/modal-story-react.tsx +++ b/src/components/modal/modal-story-react.tsx @@ -124,7 +124,8 @@ Object.assign(ThreeButtons, baseThreeButtons); // Creating a shallow clone with spread operator seems to cause // `Cannot read property 'name' of undefined` error in `@storybook/source-loader` -export default Object.assign({}, baseStory, { +export default { + ...baseStory, decorators: [ story => ( <> @@ -133,4 +134,4 @@ export default Object.assign({}, baseStory, { ), ], -}); +}; diff --git a/src/components/modal/modal-story-vue.ts b/src/components/modal/modal-story-vue.ts index 3a86f4ccd..685550c14 100644 --- a/src/components/modal/modal-story-vue.ts +++ b/src/components/modal/modal-story-vue.ts @@ -115,6 +115,4 @@ Object.assign(ThreeButtons, baseThreeButtons); // Creating a shallow clone with spread operator seems to cause // `Cannot read property 'name' of undefined` error in `@storybook/source-loader` -export default Object.assign({}, baseStory, { - decorators: [], -}); +export default { ...baseStory, decorators: [] }; diff --git a/src/components/tile/tile-story-react.tsx b/src/components/tile/tile-story-react.tsx index b5b808acf..1582ba55a 100644 --- a/src/components/tile/tile-story-react.tsx +++ b/src/components/tile/tile-story-react.tsx @@ -1,7 +1,7 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -109,6 +109,4 @@ Object.assign(expandable, baseExpandable); // Creating a shallow clone with spread operator seems to cause // `Cannot read property 'name' of undefined` error in `@storybook/source-loader` -export default Object.assign({}, baseStory, { - decorators: [story =>
{story()}
], -}); +export default { ...baseStory, decorators: [story =>
{story()}
] }; diff --git a/tests/integration/build/angular_steps.js b/tests/integration/build/angular_steps.js index 80962924d..43a6dd3cb 100644 --- a/tests/integration/build/angular_steps.js +++ b/tests/integration/build/angular_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/basic_steps.js b/tests/integration/build/basic_steps.js index 151cf43de..261c3168a 100644 --- a/tests/integration/build/basic_steps.js +++ b/tests/integration/build/basic_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/custom-style_steps.js b/tests/integration/build/custom-style_steps.js index 38c822a33..9b00daa0a 100644 --- a/tests/integration/build/custom-style_steps.js +++ b/tests/integration/build/custom-style_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/form-angular_steps.js b/tests/integration/build/form-angular_steps.js index b68f7dde6..a5b86cb33 100644 --- a/tests/integration/build/form-angular_steps.js +++ b/tests/integration/build/form-angular_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/form-basic_steps.js b/tests/integration/build/form-basic_steps.js index c137d0e00..6973fcae1 100644 --- a/tests/integration/build/form-basic_steps.js +++ b/tests/integration/build/form-basic_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/ie_steps.js b/tests/integration/build/ie_steps.js index bef841f20..ce71aa6a6 100644 --- a/tests/integration/build/ie_steps.js +++ b/tests/integration/build/ie_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/jest-puppeteer.config.js b/tests/integration/build/jest-puppeteer.config.js index 10cfff30e..616b0d3b8 100644 --- a/tests/integration/build/jest-puppeteer.config.js +++ b/tests/integration/build/jest-puppeteer.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - module.exports = { launch: { headless: process.env.CI !== 'false', diff --git a/tests/integration/build/jest.config.js b/tests/integration/build/jest.config.js index 7010fc46f..c9d12545c 100644 --- a/tests/integration/build/jest.config.js +++ b/tests/integration/build/jest.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - process.env.JEST_PUPPETEER_CONFIG = `${__dirname}/jest-puppeteer.config.js`; module.exports = { diff --git a/tests/integration/build/next_steps.js b/tests/integration/build/next_steps.js index b5cb3a7be..d08071633 100644 --- a/tests/integration/build/next_steps.js +++ b/tests/integration/build/next_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/react-ssr_steps.js b/tests/integration/build/react-ssr_steps.js index 9b78f3301..208dc0d54 100644 --- a/tests/integration/build/react-ssr_steps.js +++ b/tests/integration/build/react-ssr_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/react_steps.js b/tests/integration/build/react_steps.js index 4675ad167..1349eb1d9 100644 --- a/tests/integration/build/react_steps.js +++ b/tests/integration/build/react_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/redux-form_steps.js b/tests/integration/build/redux-form_steps.js index 824a439b1..ab19ecbe2 100644 --- a/tests/integration/build/redux-form_steps.js +++ b/tests/integration/build/redux-form_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/rtl_steps.js b/tests/integration/build/rtl_steps.js index 41ca61023..fce8f25cc 100644 --- a/tests/integration/build/rtl_steps.js +++ b/tests/integration/build/rtl_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/setup.js b/tests/integration/build/setup.js index 1d4869188..cb7d1461e 100644 --- a/tests/integration/build/setup.js +++ b/tests/integration/build/setup.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const { promisify } = require('util'); const { exec } = require('child-process-promise'); diff --git a/tests/integration/build/theme-zoning_steps.js b/tests/integration/build/theme-zoning_steps.js index 5187ebd6d..0b21f1990 100644 --- a/tests/integration/build/theme-zoning_steps.js +++ b/tests/integration/build/theme-zoning_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/vue_steps.js b/tests/integration/build/vue_steps.js index 8a64783f2..bf3727b2b 100644 --- a/tests/integration/build/vue_steps.js +++ b/tests/integration/build/vue_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const fs = require('fs-extra'); const { setup: setupDevServer, teardown: teardownDevServer } = require('jest-dev-server'); diff --git a/tests/integration/build/webpack-server.js b/tests/integration/build/webpack-server.js index 24a1be13f..666a9c38f 100644 --- a/tests/integration/build/webpack-server.js +++ b/tests/integration/build/webpack-server.js @@ -3,14 +3,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const commander = require('commander'); const webpack = require('webpack'); diff --git a/tests/integration/exec.js b/tests/integration/exec.js index 6a141ddc6..fb6030e25 100644 --- a/tests/integration/exec.js +++ b/tests/integration/exec.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const execa = require('execa'); /** diff --git a/tests/integration/replace-dependencies.js b/tests/integration/replace-dependencies.js index 3a9756a50..533cbc990 100644 --- a/tests/integration/replace-dependencies.js +++ b/tests/integration/replace-dependencies.js @@ -1,12 +1,10 @@ /** - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const fs = require('fs'); const { promisify } = require('util'); diff --git a/tests/integration/ui/accordion_steps.js b/tests/integration/ui/accordion_steps.js index 503ca4940..c8c6a812a 100644 --- a/tests/integration/ui/accordion_steps.js +++ b/tests/integration/ui/accordion_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-accordion', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-accordion--default`); diff --git a/tests/integration/ui/checkbox_steps.js b/tests/integration/ui/checkbox_steps.js index ed1a74c71..b127f3d8e 100644 --- a/tests/integration/ui/checkbox_steps.js +++ b/tests/integration/ui/checkbox_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-checkbox', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-checkbox--default`); diff --git a/tests/integration/ui/code-snippet_steps.js b/tests/integration/ui/code-snippet_steps.js index 85f0d3f64..a00e69336 100644 --- a/tests/integration/ui/code-snippet_steps.js +++ b/tests/integration/ui/code-snippet_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-code-snippet', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-code-snippet--multi-line`); diff --git a/tests/integration/ui/combo-box_steps.js b/tests/integration/ui/combo-box_steps.js index d5d16391f..09d21a0eb 100644 --- a/tests/integration/ui/combo-box_steps.js +++ b/tests/integration/ui/combo-box_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-combo-box', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-combo-box--default`); diff --git a/tests/integration/ui/content-switcher_steps.js b/tests/integration/ui/content-switcher_steps.js index 0ebe9580b..a59b64ef6 100644 --- a/tests/integration/ui/content-switcher_steps.js +++ b/tests/integration/ui/content-switcher_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-content-switcher', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-content-switcher--default`); diff --git a/tests/integration/ui/data-table_steps.js b/tests/integration/ui/data-table_steps.js index 36b3e0af9..635b374d3 100644 --- a/tests/integration/ui/data-table_steps.js +++ b/tests/integration/ui/data-table_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('data-table', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-data-table--expandable`); diff --git a/tests/integration/ui/dropdown_steps.js b/tests/integration/ui/dropdown_steps.js index ee1364b14..aba80634f 100644 --- a/tests/integration/ui/dropdown_steps.js +++ b/tests/integration/ui/dropdown_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-dropdown', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-dropdown--default`); diff --git a/tests/integration/ui/jest-playwright.config.js b/tests/integration/ui/jest-playwright.config.js index d59913577..a63b3a4d9 100644 --- a/tests/integration/ui/jest-playwright.config.js +++ b/tests/integration/ui/jest-playwright.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - module.exports = { browser: process.env.CCE_UI_INTEGRATION_TEST_BROWSER, launchBrowserApp: { diff --git a/tests/integration/ui/jest.config.js b/tests/integration/ui/jest.config.js index df0afabd2..d480335c3 100644 --- a/tests/integration/ui/jest.config.js +++ b/tests/integration/ui/jest.config.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - process.env.JEST_PLAYWRIGHT_CONFIG = `${__dirname}/jest-playwright.config.js`; module.exports = { diff --git a/tests/integration/ui/modal_steps.js b/tests/integration/ui/modal_steps.js index 8c714ccb3..e972eac9c 100644 --- a/tests/integration/ui/modal_steps.js +++ b/tests/integration/ui/modal_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-modal', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-modal--default`); diff --git a/tests/integration/ui/multi-select_steps.js b/tests/integration/ui/multi-select_steps.js index 8dee6cf79..f4275b40a 100644 --- a/tests/integration/ui/multi-select_steps.js +++ b/tests/integration/ui/multi-select_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-multi-select', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-multi-select--default`); diff --git a/tests/integration/ui/notification_steps.js b/tests/integration/ui/notification_steps.js index 591e2f094..b98ce5cdb 100644 --- a/tests/integration/ui/notification_steps.js +++ b/tests/integration/ui/notification_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-inline-notification', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-notifications--inline`); diff --git a/tests/integration/ui/overflow-menu_steps.js b/tests/integration/ui/overflow-menu_steps.js index 76b979549..32e95fc92 100644 --- a/tests/integration/ui/overflow-menu_steps.js +++ b/tests/integration/ui/overflow-menu_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-overflow-menu', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-overflow-menu--default`); diff --git a/tests/integration/ui/setup.js b/tests/integration/ui/setup.js index 0595e4b36..7a2f57106 100644 --- a/tests/integration/ui/setup.js +++ b/tests/integration/ui/setup.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const { setup: setupDevServer } = require('jest-dev-server'); const setup = require('jest-playwright-preset/setup'); const isPortReachable = require('is-port-reachable'); diff --git a/tests/integration/ui/tabs_steps.js b/tests/integration/ui/tabs_steps.js index 5831c6153..f21151342 100644 --- a/tests/integration/ui/tabs_steps.js +++ b/tests/integration/ui/tabs_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-tabs', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-tabs--default`); diff --git a/tests/integration/ui/teardown.js b/tests/integration/ui/teardown.js index 06a376555..ef2ce60d6 100644 --- a/tests/integration/ui/teardown.js +++ b/tests/integration/ui/teardown.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const { teardown: teardownDevServer } = require('jest-dev-server'); const teardown = require('jest-playwright-preset/teardown'); diff --git a/tests/integration/ui/tile_steps.js b/tests/integration/ui/tile_steps.js index 0104f52fb..4030a81d0 100644 --- a/tests/integration/ui/tile_steps.js +++ b/tests/integration/ui/tile_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-tile', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-tile--expandable`); diff --git a/tests/integration/ui/tooltip_steps.js b/tests/integration/ui/tooltip_steps.js index ea3254b89..b37110043 100644 --- a/tests/integration/ui/tooltip_steps.js +++ b/tests/integration/ui/tooltip_steps.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - describe('bx-tooltip', () => { beforeAll(async () => { await page.goto(`http://localhost:${process.env.PORT}/iframe.html?id=components-tooltip--default`); diff --git a/tests/karma-setup-renderroot.js b/tests/karma-setup-renderroot.js index 6a01da392..3da9eb34b 100644 --- a/tests/karma-setup-renderroot.js +++ b/tests/karma-setup-renderroot.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - document.head.insertAdjacentHTML( 'afterBegin', ` diff --git a/tests/karma-test-shim.js b/tests/karma-test-shim.js index 90dcfb9d8..cae82cf74 100644 --- a/tests/karma-test-shim.js +++ b/tests/karma-test-shim.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - // For generating coverage report for untested files const srcContext = require.context('../src/components', true, /^(?!.*story(-(angular|react|vue))?).*\.ts$/); srcContext.keys().forEach(srcContext); diff --git a/tests/karma.conf.js b/tests/karma.conf.js index 15b2011c1..97b94e285 100644 --- a/tests/karma.conf.js +++ b/tests/karma.conf.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - /* eslint-disable global-require */ const path = require('path'); diff --git a/tools/babel-plugin-create-react-custom-element-type-def.js b/tools/babel-plugin-create-react-custom-element-type-def.js index 0b1c2c091..d5d9fcb2c 100644 --- a/tools/babel-plugin-create-react-custom-element-type-def.js +++ b/tools/babel-plugin-create-react-custom-element-type-def.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const { default: template } = require('@babel/template'); const { createMetadataVisitor } = require('./babel-plugin-create-react-custom-element-type'); diff --git a/tools/babel-plugin-create-react-custom-element-type.js b/tools/babel-plugin-create-react-custom-element-type.js index a0b913d30..35e1627e7 100644 --- a/tools/babel-plugin-create-react-custom-element-type.js +++ b/tools/babel-plugin-create-react-custom-element-type.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const { dirname, isAbsolute, relative, resolve } = require('path'); const { default: template } = require('@babel/template'); const { default: traverse } = require('@babel/traverse'); diff --git a/tools/babel-plugin-resource-cjs-paths.js b/tools/babel-plugin-resource-cjs-paths.js index 3e2430061..e8d23fce2 100644 --- a/tools/babel-plugin-resource-cjs-paths.js +++ b/tools/babel-plugin-resource-cjs-paths.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - module.exports = function resourceCJSPaths(babel) { const t = babel.types; diff --git a/tools/babel-plugin-resource-js-paths.js b/tools/babel-plugin-resource-js-paths.js index 3af843d85..eaa3b783c 100644 --- a/tools/babel-plugin-resource-js-paths.js +++ b/tools/babel-plugin-resource-js-paths.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const { dirname, relative, resolve } = require('path'); const replaceExtension = require('replace-ext'); diff --git a/tools/check-license.js b/tools/check-license.js index 9ee05dc81..4dd63fe55 100755 --- a/tools/check-license.js +++ b/tools/check-license.js @@ -3,14 +3,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const fs = require('fs'); const { promisify } = require('util'); const commander = require('commander'); diff --git a/tools/css-result-loader.js b/tools/css-result-loader.js index 2c45a84db..21508c4e6 100644 --- a/tools/css-result-loader.js +++ b/tools/css-result-loader.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - /** * A WebPack loader to generate `lit-element`'s `CSSResult` from CSS string. * @returns {string} The massaged module content. diff --git a/tools/deep-replace.js b/tools/deep-replace.js index 0310f58fc..e7fe9d75c 100644 --- a/tools/deep-replace.js +++ b/tools/deep-replace.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const isPlainObj = require('is-plain-obj'); /** diff --git a/tools/get-changelog.js b/tools/get-changelog.js index d742d3098..f1a4eb355 100644 --- a/tools/get-changelog.js +++ b/tools/get-changelog.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const child = require('child_process'); const program = require('commander'); diff --git a/tools/get-rollup-config.js b/tools/get-rollup-config.js index 792357c4a..d1b1806bc 100644 --- a/tools/get-rollup-config.js +++ b/tools/get-rollup-config.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const autoprefixer = require('autoprefixer'); const babel = require('rollup-plugin-babel'); const commonjs = require('rollup-plugin-commonjs'); diff --git a/tools/license-text.js b/tools/license-text.js index 8d4f2cc11..8b1945124 100644 --- a/tools/license-text.js +++ b/tools/license-text.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const currentYear = new Date().getFullYear(); const licenseText = `Copyright IBM Corp\\..* \\d+.*This source code is licensed under the Apache-2\\.0 license found in the .*LICENSE file in the root directory of this source tree.`; diff --git a/tools/postcss-fix-host-pseudo.js b/tools/postcss-fix-host-pseudo.js index b62e0b811..27ee4bb52 100644 --- a/tools/postcss-fix-host-pseudo.js +++ b/tools/postcss-fix-host-pseudo.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const postcss = require('postcss'); const parser = require('postcss-selector-parser'); diff --git a/tools/rollup-plugin-icons.js b/tools/rollup-plugin-icons.js index 66639b26e..240c38611 100644 --- a/tools/rollup-plugin-icons.js +++ b/tools/rollup-plugin-icons.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const { createFilter } = require('rollup-pluginutils'); const createSVGResultCarbonIcon = require('./svg-result-carbon-icon'); diff --git a/tools/rollup-plugin-license.js b/tools/rollup-plugin-license.js index 95cb26a16..8759b5c51 100644 --- a/tools/rollup-plugin-license.js +++ b/tools/rollup-plugin-license.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const readPkgUp = require('read-pkg-up'); const MagicString = require('magic-string'); diff --git a/tools/rollup-plugin-lit-scss.js b/tools/rollup-plugin-lit-scss.js index 8bad3a1d4..d06300d90 100644 --- a/tools/rollup-plugin-lit-scss.js +++ b/tools/rollup-plugin-lit-scss.js @@ -7,8 +7,6 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const { promisify } = require('util'); const sass = require('sass'); diff --git a/tools/svg-result-carbon-icon-loader.js b/tools/svg-result-carbon-icon-loader.js index e4ec1ccd2..44eb7dd98 100644 --- a/tools/svg-result-carbon-icon-loader.js +++ b/tools/svg-result-carbon-icon-loader.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019, 2020 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const path = require('path'); const createSVGResultFromCarbonIcon = require('./svg-result-carbon-icon'); diff --git a/tools/svg-result-carbon-icon.js b/tools/svg-result-carbon-icon.js index 8a256c9d2..31f408ec1 100644 --- a/tools/svg-result-carbon-icon.js +++ b/tools/svg-result-carbon-icon.js @@ -1,14 +1,12 @@ /** * @license * - * Copyright IBM Corp. 2019 + * Copyright IBM Corp. 2019, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; - const { getAttributes, formatAttributes } = require('@carbon/icon-helpers'); // TODO: update @carbon/icon-helpers with this version of toString diff --git a/yarn.lock b/yarn.lock index 6371f722f..6ad54f933 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8954,7 +8954,7 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" -confusing-browser-globals@^1.0.5: +confusing-browser-globals@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== @@ -10777,14 +10777,14 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-airbnb-base@^13.2.0: - version "13.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.2.0.tgz#f6ea81459ff4dec2dda200c35f1d8f7419d57943" - integrity sha512-1mg/7eoB4AUeB0X1c/ho4vb2gYkNH8Trr/EgCT/aGmKhhG+F6vF5s8+iRBlWAzFIAphxIdp3YfEKgEl0f9Xg+w== +eslint-config-airbnb-base@^14.2.1: + version "14.2.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" + integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== dependencies: - confusing-browser-globals "^1.0.5" - object.assign "^4.1.0" - object.entries "^1.1.0" + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.2" eslint-config-carbon-base@^1.0.1: version "1.0.1" @@ -17073,7 +17073,7 @@ object.entries@^1.1.0: function-bind "^1.1.1" has "^1.0.3" -object.entries@^1.1.4: +object.entries@^1.1.2, object.entries@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==