Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
feat: move to NordicSemiconductor organization
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this renames the package

See bifravst/bifravst#56
  • Loading branch information
coderbyheart committed Jan 27, 2021
1 parent ca2b544 commit 0e74b9b
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 39 deletions.
6 changes: 3 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ pull_request_rules:
- name: Automatic merge security PRs when all status checks pass
conditions:
- author~=^(snyk-bot|dependabot\[bot\])$
- status-success=security/snyk (Bifravst)
- status-success=security/snyk (Asset Tracker Cloud)
actions:
merge:
method: rebase
rebase_fallback: squash
bot_account: bifravst-ci
bot_account: asset-tracker-cloud-ci
label:
add:
- mergify
rebase:
bot_account: bifravst-ci
bot_account: asset-tracker-cloud-ci
6 changes: 3 additions & 3 deletions .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ patch:
patched: '2020-06-02T07:58:08.087Z'
- eslint > table > lodash:
patched: '2020-06-02T07:58:08.087Z'
- '@bifravst/eslint-config-typescript > @typescript-eslint/parser > @typescript-eslint/typescript-estree > lodash':
- '@nordicsemiconductor/eslint-config-typescript > @typescript-eslint/parser > @typescript-eslint/typescript-estree > lodash':
patched: '2020-06-02T07:58:08.087Z'
- '@bifravst/eslint-config-typescript > @typescript-eslint/eslint-plugin > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > lodash':
- '@nordicsemiconductor/eslint-config-typescript > @typescript-eslint/eslint-plugin > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > lodash':
patched: '2020-06-02T07:58:08.087Z'
- '@bifravst/eslint-config-typescript > @typescript-eslint/parser > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > lodash':
- '@nordicsemiconductor/eslint-config-typescript > @typescript-eslint/parser > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > lodash':
patched: '2020-06-02T07:58:08.087Z'
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
See https://github.com/bifravst/bifravst/blob/saga/CODE_OF_CONDUCT.md
See
https://github.com/NordicSemiconductor/asset-tracker-cloud-docs/blob/saga/CODE_OF_CONDUCT.md
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# Bifravst Code Style [![npm version](https://img.shields.io/npm/v/@bifravst/code-style.svg)](https://www.npmjs.com/package/@bifravst/code-style)
# Code Style definitions for all Asset Tracker Cloud Example projects [![npm version](https://img.shields.io/npm/v/@nordicsemiconductor/asset-tracker-cloud-code-style.svg)](https://www.npmjs.com/package/@nordicsemiconductor/asset-tracker-cloud-code-style)

[![GitHub Actions](https://github.com/bifravst/code-style/workflows/Semantic%20Release/badge.svg)](https://github.com/bifravst/code-style/actions)
[![Known Vulnerabilities](https://snyk.io/test/github/bifravst/code-style/badge.svg)](https://snyk.io/test/github/bifravst/code-style)
[![GitHub Actions](https://github.com/NordicSemiconductor/asset-tracker-cloud-code-style-js/workflows/Semantic%20Release/badge.svg)](https://github.com/NordicSemiconductor/asset-tracker-cloud-code-style-js/actions)
[![Known Vulnerabilities](https://snyk.io/test/github/NordicSemiconductor/asset-tracker-cloud-code-style-js/badge.svg?targetFile=package.json)](https://snyk.io/test/github/NordicSemiconductor/asset-tracker-cloud-code-style-js?targetFile=package.json)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://dashboard.mergify.io/badges/bifravst/code-style&style=flat)](https://mergify.io)
[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://dashboard.mergify.io/badges/NordicSemiconductor/asset-tracker-cloud-code-style-js&style=flat)](https://mergify.io)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/)
[![ESLint: TypeScript](https://img.shields.io/badge/ESLint-TypeScript-blue.svg)](https://github.com/typescript-eslint/typescript-eslint)

Code style definitions for all Bifravst projects.

- ESLint configuration (with
[TypeScript support](https://github.com/typescript-eslint/typescript-eslint))
- Prettier configuration

## Installation

npm i --save-dev @bifravst/code-style
npm i --save-dev @nordicsemiconductor/asset-tracker-cloud-code-style

## Usage

Expand All @@ -31,17 +29,17 @@ Update your `package.json`:
}
},
"lint-staged": {
"*.{ts,tsx}": ["prettier --write", "eslint --ext .js,.ts", "git add"],
"*.{md,json,yaml,yml,js}": ["prettier --write", "git add"]
"*.{ts,tsx}": ["prettier --write", "eslint --ext .js,.ts"],
"*.{md,json,yaml,yml,js}": ["prettier --write"]
}
}
```

Then:

npm i --save-dev @bifravst/code-style
cp node_modules/@bifravst/code-style/templates/* ./
cp node_modules/@bifravst/code-style/templates/.* ./
npm i --save-dev @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/.* ./

## Use with React

Expand All @@ -51,7 +49,10 @@ Use this `.eslintrc`

```json
{
"extends": ["@bifravst/eslint-config-typescript", "plugin:react/recommended"],
"extends": [
"@nordicsemiconductor/eslint-config-typescript",
"plugin:react/recommended"
],
"settings": {
"react": {
"version": "latest"
Expand All @@ -64,7 +65,7 @@ Use this `.eslintrc`

```json
{
"extends": "@bifravst/code-style/tsconfig.json",
"extends": "@nordicsemiconductor/asset-tracker-cloud-code-style/tsconfig.json",
"include": ["src/*.tsx", "src/*.ts"],
"exclude": ["src/*.spec.ts"],
"compilerOptions": {
Expand All @@ -83,16 +84,16 @@ Use this `.eslintrc`

```json
{
"extends": ["@bifravst/eslint-config-typescript", "react-app"]
"extends": ["@nordicsemiconductor/eslint-config-typescript", "react-app"]
}
```

npm i --save-dev 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.

## Migrating to @bifravst/code-style
## Migrating to @nordicsemiconductor/asset-tracker-cloud-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 @bifravst/code-style tslint lint-staged prettier typescript
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
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{
"name": "@bifravst/code-style",
"name": "@nordicsemiconductor/asset-tracker-cloud-code-style",
"version": "0.0.0-development",
"description": "Code style definitions for all Bifravst projects.",
"description": "Code style definitions for all Asset Tracker Cloud Example projects.",
"repository": {
"type": "git",
"url": "git+https://github.com/bifravst/code-style.git"
"url": "git+https://github.com/NordicSemiconductor/asset-tracker-cloud-code-style-js.git"
},
"bugs": {
"url": "https://github.com/bifravst/code-style/issues"
"url": "https://github.com/NordicSemiconductor/asset-tracker-cloud-code-style-js/issues"
},
"homepage": "https://bifravst.github.io/",
"homepage": "https://github.com/NordicSemiconductor/asset-tracker-cloud-code-style-js#readme",
"keywords": [
"Cloud",
"IoT",
"Bifravst",
"Asset Tracker",
"NordicSemiconductor"
"Asset Tracker Cloud Example",
"Nordic Semiconductor"
],
"author": "Nordic Semiconductor ASA | nordicsemi.no",
"license": "BSD-3-Clause",
"devDependencies": {
"@bifravst/eslint-config-typescript": "5.0.90",
"@nordicsemiconductor/eslint-config-typescript": "5.0.90",
"@commitlint/cli": "11.0.0",
"@commitlint/config-angular": "11.0.0",
"eslint": "7.18.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@bifravst/eslint-config-typescript"
"extends": "@nordicsemiconductor/eslint-config-typescript"
}
2 changes: 1 addition & 1 deletion templates/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
...require('@bifravst/code-style/.prettierrc'),
...require('@nordicsemiconductor/asset-tracker-cloud-code-style/.prettierrc'),
}
2 changes: 1 addition & 1 deletion templates/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@bifravst/code-style/tsconfig.json",
"extends": "@nordicsemiconductor/asset-tracker-cloud-code-style/tsconfig.json",
"include": ["**/*.ts"],
"compilerOptions": {
"outDir": "dist/"
Expand Down

0 comments on commit 0e74b9b

Please sign in to comment.