File tree Expand file tree Collapse file tree 9 files changed +18
-19
lines changed Expand file tree Collapse file tree 9 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- const babelJest = require ( 'babel-jest' ) . default ;
15
+ import babelJest from 'babel-jest' ;
16
16
17
17
const babelConfiguration = {
18
18
presets : [
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- const path = require ( 'path' ) ;
15
+ import path from 'path' ;
16
16
17
17
// Simple Jest transform that stubs out CSS files and returns the file name as the mock content for other file types.
18
18
module . exports = {
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ rafPolyfill();
22
22
global . TextEncoder = TextEncoder ;
23
23
24
24
/* eslint-disable import/no-extraneous-dependencies */
25
- const Enzyme = require ( 'enzyme' ) ;
26
- const EnzymeAdapter = require ( '@wojtekmaj/enzyme-adapter-react-17' ) ;
27
- const createSerializer = require ( 'enzyme-to-json' ) . createSerializer ;
25
+ import Enzyme from 'enzyme' ;
26
+ import EnzymeAdapter from '@wojtekmaj/enzyme-adapter-react-17' ;
27
+ import { createSerializer } from 'enzyme-to-json' ;
28
28
29
29
Enzyme . configure ( { adapter : new EnzymeAdapter ( ) } ) ;
30
30
expect . addSnapshotSerializer ( createSerializer ( { mode : 'deep' } ) ) ;
Original file line number Diff line number Diff line change 14
14
15
15
/* eslint-disable import/no-extraneous-dependencies */
16
16
/* eslint-disable @typescript-eslint/no-var-requires */
17
-
18
- const { join } = require ( 'path' ) ;
19
- const { CleanWebpackPlugin } = require ( 'clean-webpack-plugin' ) ;
20
- const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
21
- const nodeExternals = require ( 'webpack-node-externals' ) ;
17
+ import { join } from 'path' ;
18
+ import { CleanWebpackPlugin } from 'clean-webpack-plugin' ;
19
+ import HtmlWebpackPlugin from 'html-webpack-plugin' ;
20
+ import nodeExternals from 'webpack-node-externals' ;
22
21
23
22
const babelConfigPath = require . resolve ( './babel.config' ) ;
24
23
Original file line number Diff line number Diff line change 13
13
// limitations under the License.
14
14
15
15
// eslint-disable-next-line @typescript-eslint/no-var-requires
16
- const factory = require ( './webpack-factory' ) ;
16
+ import factory from './webpack-factory' ;
17
17
18
18
module . exports = factory ( 'development' ) ;
Original file line number Diff line number Diff line change 13
13
// limitations under the License.
14
14
15
15
// eslint-disable-next-line @typescript-eslint/no-var-requires
16
- const factory = require ( './webpack-factory' ) ;
16
+ import factory from './webpack-factory' ;
17
17
18
18
module . exports = factory ( 'layout-worker' ) ;
Original file line number Diff line number Diff line change 13
13
// limitations under the License.
14
14
15
15
// eslint-disable-next-line @typescript-eslint/no-var-requires
16
- const factory = require ( './webpack-factory' ) ;
16
+ import factory from './webpack-factory' ;
17
17
18
18
module . exports = factory ( 'umd' ) ;
Original file line number Diff line number Diff line change 14
14
15
15
/* eslint-disable import/no-extraneous-dependencies */
16
16
/* eslint-disable @typescript-eslint/no-var-requires */
17
- const fs = require ( 'fs' ) ;
18
- const path = require ( 'path' ) ;
19
- const { babelConfiguration } = require ( '../packages/jaeger-ui/test/babel-transform' ) ;
17
+ import fs from 'fs' ;
18
+ import path from 'path' ;
19
+ import { babelConfiguration } from '../packages/jaeger-ui/test/babel-transform' ;
20
20
21
21
const packageNames = [
22
22
...babelConfiguration . presets . flatMap ( preset => {
Original file line number Diff line number Diff line change 14
14
15
15
/* eslint-disable import/no-extraneous-dependencies */
16
16
/* eslint-disable @typescript-eslint/no-var-requires */
17
- const fs = require ( 'fs' ) ;
18
- const path = require ( 'path' ) ;
19
- const getBabelConfig = require ( '../packages/plexus/babel.config' ) ;
17
+ import fs from 'fs' ;
18
+ import path from 'path' ;
19
+ import getBabelConfig from '../packages/plexus/babel.config' ;
20
20
21
21
const babelConfiguration = getBabelConfig ( {
22
22
env : ( ) => {
You can’t perform that action at this time.
0 commit comments