Skip to content

Commit

Permalink
Add prettier-config
Browse files Browse the repository at this point in the history
  • Loading branch information
benbender committed Jan 1, 2021
1 parent 150168b commit e5adeaa
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 40 deletions.
27 changes: 22 additions & 5 deletions eslint-config/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
# @webdev-config/eslint
ESLint configuration to be shared across repositories.
# @benbender/eslint-config

# Install
`npm i -D @benbender/eslint-config`
[ESLint](https://eslint.org) configuration to be shared across repositories.

`npx install-peerdeps --dev @benbender/eslint-config`
## Usage

**Install**:

```bash
$ yarn add --dev @benbender/eslint-config
```

**Edit `package.json`**:

```jsonc
{
// ...
"eslintConfig": {
"extends": [
"@benbender"
]
}
}
```
1 change: 0 additions & 1 deletion eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
settings: {
react: {
Expand Down
6 changes: 2 additions & 4 deletions eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
"files": [
"index.js"
],
"devDependencies": {
"dependencies": {
"@next/eslint-plugin-next": "^10.0.4",
"@typescript-eslint/eslint-plugin": "^4.11.0",
"@typescript-eslint/parser": "^4.11.0",
"eslint": "^7.16.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest-dom": "^3.6.5",
Expand All @@ -40,8 +39,7 @@
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-testing-library": "^3.10.1",
"prettier": "^2.2.1",
"prettier-plugin-tailwind": "^2.2.8"
"@benbender/prettier-config": "^0.1.0"
},
"peerDependencies": {
"eslint": ">= 7"
Expand Down
30 changes: 0 additions & 30 deletions eslint-config/tsconfig.json

This file was deleted.

21 changes: 21 additions & 0 deletions prettier-config/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Benjamin Bender <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions prettier-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# @benbender/prettier-config

[Prettier](https://prettier.io) configuration to be shared across repositories.

## Usage

**Install**:

```bash
$ yarn add --dev @benbender/prettier-config
```

**Edit `package.json`**:

```jsonc
{
// ...
"prettier": "@benbender/prettier-config"
}
```
3 changes: 3 additions & 0 deletions prettier-config/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json.schemastore.org/prettierrc"
}
36 changes: 36 additions & 0 deletions prettier-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@benbender/prettier-config",
"version": "0.0.0",
"description": "Prettier configuration to be shared across repositories.",
"main": "index.js",
"author": "Benjamin Bender <[email protected]>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/benbender/cp-common.git",
"directory": "prettier-config"
},
"bugs": {
"url": "https://github.com/benbender/cp-common/issues"
},
"homepage": "https://github.com/benbender/cp-common#readme",
"keywords": [
"prettier",
"configuration"
],
"scripts": {
"test": "eslint ./index.js",
"lint": "eslint ./index.js",
"lint:fix": "eslint ./index.js --fix"
},
"files": [
"index.js"
],
"dependencies": {
"prettier": "^2.2.1",
"prettier-plugin-tailwind": "^2.2.8"
},
"peerDependencies": {
"prettier": ">= 2.2"
}
}

0 comments on commit e5adeaa

Please sign in to comment.