![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@nordicsemiconductor/asset-tracker-cloud-code-style
Advanced tools
Code style definitions for all nRF Asset Tracker projects.
Code Style definitions for all nRF Asset Tracker projects
npm i --save-dev --save-exact @nordicsemiconductor/asset-tracker-cloud-code-style
Update your package.json
:
{
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,tsx}": ["prettier --write", "eslint --ext .js,.ts"],
"*.{md,json,yaml,yml,js}": ["prettier --write"]
}
}
Then:
npm i --save-dev --save-exact @nordicsemiconductor/asset-tracker-cloud-code-style
cp node_modules/@nordicsemiconductor/asset-tracker-cloud-code-style/templates/* ./
cp node_modules/@nordicsemiconductor/asset-tracker-cloud-code-style/templates/.* ./
npm install eslint-plugin-react --save-dev
Use this .eslintrc
{
"extends": [
"@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript",
"plugin:react/recommended"
],
"settings": {
"react": {
"version": "latest"
}
}
}
tsconfig.json
:
{
"extends": "@nordicsemiconductor/asset-tracker-cloud-code-style/tsconfig.json",
"include": ["src/*.tsx", "src/*.ts"],
"exclude": ["src/*.spec.ts"],
"compilerOptions": {
"outDir": "dist/",
"jsx": "react",
"lib": ["DOM", "ES5"],
"target": "es2018",
"esModuleInterop": true
}
}
Use this .eslintrc
{
"extends": [
"@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript",
"react-app"
]
}
npm i --save-dev --save-exact babel-eslint@10.0.2 eslint-config-react-app@5.0.1 eslint-plugin-flowtype@4.2.0 eslint-plugin-import@2.18.2 eslint-plugin-jsx-a11y@6.2.3 eslint-plugin-react@7.14.3 eslint-plugin-react-app@6.0.0 eslint-plugin-react-hooks@1.7.0
Do not use tsconfig.json
from code-style.
For converting projects to use code-style:
npm uninstall --save --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier lint-staged prettier semantic-release @nordicsemiconductor/asset-tracker-cloud-code-style tslint lint-staged prettier typescript
FAQs
Code style definitions for all nRF Asset Tracker projects.
The npm package @nordicsemiconductor/asset-tracker-cloud-code-style receives a total of 159 weekly downloads. As such, @nordicsemiconductor/asset-tracker-cloud-code-style popularity was classified as not popular.
We found that @nordicsemiconductor/asset-tracker-cloud-code-style demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.