npm.io
14.0.1 • Published 3 years ago

@talend/scripts-preset-react-lib

Licence
Apache-2.0
Version
14.0.1
Deps
9
Size
13 kB
Vulns
0
Weekly
0
Stars
159

Talend Preset

This is a preset for @talend/scripts-core. It holds most of Talend projects tools configuration for hybrid angularJS/react webapp.

This preset allows some customisation through specific entry points. The configuration is done via talend-scripts configuration file.

Customisation

Details

Babel
Jest
Configuration Description
moduleNameMapper * jpg/jpeg/png/gif/eot/otf/webp/svg/woff/woff2 are mocked with an empty object
* css/scss are mocked with an object that adds a theme prefix to the requested classname. Example: drawer will result to theme-drawer. This is used to spot the classnames that come from css modules.
rootDir You app root folder
setupFilesAfterEnv * It configures enzyme with react 16 adapter
* It mocks fetch with (url, { response }) => promise that resolved response
testEnvironment It uses jest-environment-jsdom-global
testRegex Jest will execute all the files that ends with .test.js in your src/ folder.
transform It transforms js files via babel, using the same babel configuration as webpack.
Eslint

The linter is based on airbnb configuration, with some customisation. Eslint configuration

Typescript