Releases: NordicSemiconductor/pc-nrfconnect-shared
v4.9.5
Fixed
- More type enhancements:
- Correct
systemReport
signature - Limit array types to readonly where possible
- Do not use void as a callback return value
- Correct
- Make linting fail if the type check fails
- Remove conflicting ESLint rule 'quotes'
- Lint all JavaScript files in this project, not just the ones in src/
v4.9.4
v4.9.3
v4.9.2
Fixed
- Some types
v4.9.1
Fixed
- Relax ESLint rule regarding @ts-ignore comments
v4.9.0
Added
- Default
tsconfig.json
for other projects to use - Additional checks during linting:
- Check for a
tsconfig.json
if the project uses TypeScript (if there are
any files with the endings.ts
or.tsx
) - Run
tsc --noEmit
if there is atsconfig.json
to check the TypeScript
types
- Check for a
Fixed
- Type error in bleChannels
Steps to upgrade when using this package
-
If you want to use the settings from
config/tsconfig.json
in a
TypeScript project, then put this into atsconfig.json
in the
root of your project:{ "extends": "./node_modules/pc-nrfconnect-shared/config/tsconfig.json", }
Please note that
tsconfig.json
is not used for the compilation of your
project. We use the TypeScript transform plugin of babel for compilation and
that does not use the settings from
tsconfig.json
.
But the settings intsconfig.json
are useful nonetheless, because they
respected by many IDEs and editors as well as when you runtsc
.If you want to override any settings from the default
tsconfig.json
you
are free to do so. We putstrict
ontrue
in there because that is what
we aim for but you may want to relax that a bit when transitioning existing
projects.
v4.8.19
Fixed
- Version number for 4.8.18 release was wrong in
package.json
.
v4.8.18
Updated
- Added
prettier.config.js
to existing scriptnpm run lint-init
v4.8.17
Updated
- New design, device selector: Add PCA number, better alignment for port names, removed wrong line below port names
v4.8.16
Added
- Added support for files written in TypeScript
- Added Prettier formatting rules to ESLint
Note that apps using this version should add the following entry to their package.json
file:
{ "prettier": "./node_modules/pc-nrfconnect-shared/config/prettier.config.js" }
If this isn't added, the Prettier defaults will be used, which differ from our style choices
in a number of ways.
On first run, the linting is likely to fail due to the prevalence of formatting errors.
The majority of these can be fixed automatically, by running npm run lint -- --fix
.