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

Commit

Permalink
applying prettier to this project as well, updating name
Browse files Browse the repository at this point in the history
  • Loading branch information
frytg committed Mar 11, 2021
1 parent 9cad068 commit 583af8a
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 41 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish package to Github

on:
release:
types: [created]

jobs:
github:
runs-on: ubuntu-latest
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v2

- name: 🛠 Setup Node
uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@swrlab'

- name: 📦 Install Dependencies
run: npm install

- name: 🚀 npm publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
package-lock.json
package.json
yarn.lock
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require("./index"),
};
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = {
printWidth: 120, // prettier recommends 80 (old Unix-Style)
tabWidth: 8,
useTabs: true,
semi: true, // default
singleQuote: true,
quoteProps: 'as-needed', // default
trailingComma: 'es5', // default since 2.0.0
bracketSpacing: true, // default
arrowParens: 'always', // default since 2.0.0
endOfLine: 'lf', // default since 2.0.0
};
printWidth: 120, // prettier recommends 80 (old Unix-Style)
tabWidth: 8,
useTabs: true,
semi: false, // default
singleQuote: true,
quoteProps: 'as-needed', // default
trailingComma: 'es5', // default since 2.0.0
bracketSpacing: true, // default
arrowParens: 'always', // default since 2.0.0
endOfLine: 'lf', // default since 2.0.0
}
42 changes: 20 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
{
"name": "@swr/prettier-config",
"version": "0.0.1",
"description": "SWR Prettier config.",
"keywords": [
"prettier"
],
"files": [
"index.js"
],
"license": "ISC",
"author": "SWR audio lab <[email protected]>",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/swrlab/swr-prettier-config"
},
"license": "ISC",
"bugs": "https://github.com/swrlab/swr-prettier-config/issues",
"homepage": "https://github.com/swrlab/swr-prettier-config#readme",
"scripts": {
}
}
"name": "@swrlab/prettier-config",
"version": "0.1.0",
"description": "SWR Prettier config.",
"keywords": [
"prettier"
],
"files": [
"index.js"
],
"license": "ISC",
"author": "SWR Audio Lab <[email protected]>",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/swrlab/swr-prettier-config"
},
"bugs": "https://github.com/swrlab/swr-prettier-config/issues",
"homepage": "https://github.com/swrlab/swr-prettier-config#readme",
"scripts": {}
}
13 changes: 6 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@

## Installation

1. Install npm package
Step 1: Install [npm package](https://www.npmjs.com/package/@swrlab/swr-prettier-config)

```shell
npm install @swr/prettier-config
npm install @swrlab/swr-prettier-config
```

1. Include in `package.json`:
Step 2: Include in `package.json`:

```json
{
"prettier": "@swr/prettier-config"
"prettier": "@swrlab/swr-prettier-config"
}
```

2. Or create a `.prettierrc.json` file with a link:
Or create a `.prettierrc.json` file with a link:

```json
"@swr/prettier-config"
"@swrlab/swr-prettier-config"
```

0 comments on commit 583af8a

Please sign in to comment.