Skip to content

Commit

Permalink
chore: upgrade pob and run prettier outside of eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Nov 14, 2020
1 parent 6d8132b commit f2d3b30
Show file tree
Hide file tree
Showing 26 changed files with 82 additions and 73 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ jobs:
- name: Checks
run: yarn run checks

- name: Lint
run: yarn run lint
- name: Prettier
run: yarn run lint:prettier
if: startsWith(matrix.node-version, '14.')

- name: Eslint
run: yarn run lint:eslint
if: startsWith(matrix.node-version, '14.')

- name: Check nothing was forgotten before commit
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CHANGELOG.md
/.pnp.js
/.yarn/**/*
/@pob/*/dist
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"source.organizeImports": false
},
// eslint config
"eslint.workingDirectories": [
"."
],
"eslint.workingDirectories": ["."],
"eslint.options": {
"resolvePluginsRelativeTo": ".",
"reportUnusedDisableDirectives": true
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 2 additions & 16 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
defaultSemverRangePrefix: ^

packageExtensions:
"@samverschueren/stream-to-observable@*":
peerDependenciesMeta:
rxjs:
optional: true
zen-observable:
optional: true
any-observable@*:
peerDependenciesMeta:
rxjs:
optional: true
zen-observable:
optional: true

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-deduplicate.cjs
spec: "https://raw.githubusercontent.com/eps1lon/yarn-plugin-deduplicate/latest/bin/%40yarnpkg/plugin-deduplicate.js"
spec: 'https://raw.githubusercontent.com/eps1lon/yarn-plugin-deduplicate/latest/bin/%40yarnpkg/plugin-deduplicate.js'

yarnPath: .yarn/releases/yarn-2.3.3.cjs
3 changes: 1 addition & 2 deletions @pob/eslint-config-node/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"extends": [
"../eslint-config/lib/index.js",
"../eslint-config-node/lib/index.js"
],
"ignorePatterns": ["/dist", "/test", "/public", "/build"]
]
}
5 changes: 4 additions & 1 deletion @pob/eslint-config-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "./lib/index.js",
"sideEffects": false,
"scripts": {
"lint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-node"
"lint:eslint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-node"
},
"prettier": {
"trailingComma": "all",
Expand All @@ -40,5 +40,8 @@
"dependencies": {
"@pob/use-eslint-plugin": "^41.0.0",
"eslint-plugin-node": "^11.1.0"
},
"devDependencies": {
"eslint": "7.13.0"
}
}
3 changes: 1 addition & 2 deletions @pob/eslint-config-typescript-node/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"extends": [
"../eslint-config/lib/index.js",
"../eslint-config-node/lib/index.js"
],
"ignorePatterns": ["/dist", "/test", "/public", "/build"]
]
}
5 changes: 4 additions & 1 deletion @pob/eslint-config-typescript-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "./lib/index.js",
"sideEffects": false,
"scripts": {
"lint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-typescript-node"
"lint:eslint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-typescript-node"
},
"prettier": {
"trailingComma": "all",
Expand All @@ -44,5 +44,8 @@
"dependencies": {
"@pob/use-eslint-plugin": "^41.0.0",
"eslint-plugin-node": "^11.1.0"
},
"devDependencies": {
"eslint": "7.13.0"
}
}
3 changes: 1 addition & 2 deletions @pob/eslint-config-typescript-react/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"extends": [
"../eslint-config/lib/index.js",
"../eslint-config-node/lib/index.js"
],
"ignorePatterns": ["/dist", "/test", "/public", "/build"]
]
}
5 changes: 4 additions & 1 deletion @pob/eslint-config-typescript-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "./lib/index.js",
"sideEffects": false,
"scripts": {
"lint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-typescript-react"
"lint:eslint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-typescript-react"
},
"prettier": {
"trailingComma": "all",
Expand Down Expand Up @@ -53,5 +53,8 @@
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.1.2"
},
"devDependencies": {
"eslint": "7.13.0"
}
}
3 changes: 1 addition & 2 deletions @pob/eslint-config-typescript/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"extends": [
"../eslint-config/lib/index.js",
"../eslint-config-node/lib/index.js"
],
"ignorePatterns": ["/dist", "/test", "/public", "/build"]
]
}
5 changes: 4 additions & 1 deletion @pob/eslint-config-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "./lib/index.js",
"sideEffects": false,
"scripts": {
"lint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-typescript"
"lint:eslint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config-typescript"
},
"prettier": {
"trailingComma": "all",
Expand Down Expand Up @@ -58,5 +58,8 @@
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.1.4"
},
"devDependencies": {
"eslint": "7.13.0"
}
}
3 changes: 1 addition & 2 deletions @pob/eslint-config/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"extends": [
"../eslint-config/lib/index.js",
"../eslint-config-node/lib/index.js"
],
"ignorePatterns": ["/dist", "/test", "/public", "/build"]
]
}
5 changes: 4 additions & 1 deletion @pob/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "./lib/index.js",
"sideEffects": false,
"scripts": {
"lint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config"
"lint:eslint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/eslint-config"
},
"prettier": {
"trailingComma": "all",
Expand All @@ -46,5 +46,8 @@
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-unicorn": "^23.0.0"
},
"devDependencies": {
"eslint": "7.13.0"
}
}
3 changes: 1 addition & 2 deletions @pob/use-eslint-plugin/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"extends": [
"../eslint-config/lib/index.js",
"../eslint-config-node/lib/index.js"
],
"ignorePatterns": ["/dist", "/test", "/public", "/build"]
]
}
7 changes: 5 additions & 2 deletions @pob/use-eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
"main": "./lib/index.js",
"sideEffects": false,
"scripts": {
"lint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/use-eslint-plugin"
"lint:eslint": "yarn --cwd ../.. eslint --report-unused-disable-directives --quiet @pob/use-eslint-plugin"
},
"prettier": {
"trailingComma": "all",
"singleQuote": true,
"arrowParens": "always"
},
"pob": {}
"pob": {},
"devDependencies": {
"eslint": "7.13.0"
}
}
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@

This repository is a monorepo that we manage using [Lerna](https://github.com/lerna/lerna).

| Package | Version | Description |
|---------|---------|-------------|
| [@pob/eslint-config](@pob/eslint-config) | <a href="https://npmjs.org/package/@pob/eslint-config"><img src="https://img.shields.io/npm/v/@pob/eslint-config.svg?style=flat-square"></a> | eslint config files
| [@pob/eslint-config-node](@pob/eslint-config-node) | <a href="https://npmjs.org/package/@pob/eslint-config-node"><img src="https://img.shields.io/npm/v/@pob/eslint-config-node.svg?style=flat-square"></a> | eslint config files
| [@pob/eslint-config-typescript](@pob/eslint-config-typescript) | <a href="https://npmjs.org/package/@pob/eslint-config-typescript"><img src="https://img.shields.io/npm/v/@pob/eslint-config-typescript.svg?style=flat-square"></a> | eslint config files
| [@pob/eslint-config-typescript-node](@pob/eslint-config-typescript-node) | <a href="https://npmjs.org/package/@pob/eslint-config-typescript-node"><img src="https://img.shields.io/npm/v/@pob/eslint-config-typescript-node.svg?style=flat-square"></a> | eslint config files
| [@pob/eslint-config-typescript-react](@pob/eslint-config-typescript-react) | <a href="https://npmjs.org/package/@pob/eslint-config-typescript-react"><img src="https://img.shields.io/npm/v/@pob/eslint-config-typescript-react.svg?style=flat-square"></a> | eslint config files
| [@pob/use-eslint-plugin](@pob/use-eslint-plugin) | <a href="https://npmjs.org/package/@pob/use-eslint-plugin"><img src="https://img.shields.io/npm/v/@pob/use-eslint-plugin.svg?style=flat-square"></a> | check plugin version between dependency and root

| Package | Version | Description |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------ |
| [@pob/eslint-config](@pob/eslint-config) | <a href="https://npmjs.org/package/@pob/eslint-config"><img src="https://img.shields.io/npm/v/@pob/eslint-config.svg?style=flat-square"></a> | eslint config files |
| [@pob/eslint-config-node](@pob/eslint-config-node) | <a href="https://npmjs.org/package/@pob/eslint-config-node"><img src="https://img.shields.io/npm/v/@pob/eslint-config-node.svg?style=flat-square"></a> | eslint config files |
| [@pob/eslint-config-typescript](@pob/eslint-config-typescript) | <a href="https://npmjs.org/package/@pob/eslint-config-typescript"><img src="https://img.shields.io/npm/v/@pob/eslint-config-typescript.svg?style=flat-square"></a> | eslint config files |
| [@pob/eslint-config-typescript-node](@pob/eslint-config-typescript-node) | <a href="https://npmjs.org/package/@pob/eslint-config-typescript-node"><img src="https://img.shields.io/npm/v/@pob/eslint-config-typescript-node.svg?style=flat-square"></a> | eslint config files |
| [@pob/eslint-config-typescript-react](@pob/eslint-config-typescript-react) | <a href="https://npmjs.org/package/@pob/eslint-config-typescript-react"><img src="https://img.shields.io/npm/v/@pob/eslint-config-typescript-react.svg?style=flat-square"></a> | eslint config files |
| [@pob/use-eslint-plugin](@pob/use-eslint-plugin) | <a href="https://npmjs.org/package/@pob/use-eslint-plugin"><img src="https://img.shields.io/npm/v/@pob/use-eslint-plugin.svg?style=flat-square"></a> | check plugin version between dependency and root |
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
],
"scripts": {
"checks": "node scripts/check-packages-dependencies.js",
"lint": "eslint --report-unused-disable-directives --quiet --resolve-plugins-relative-to . --ext js,ts,tsx .",
"lint": "yarn run lint:prettier && yarn run lint:eslint",
"lint:eslint": "eslint --report-unused-disable-directives --quiet --resolve-plugins-relative-to . --ext js,ts,tsx .",
"lint:prettier": "prettier --check .",
"preversion": "yarn run lint && repository-check-dirty",
"release": "GH_TOKEN=$POB_GITHUB_TOKEN lerna version --conventional-commits --conventional-graduate --create-release=github -m 'chore: release' && lerna publish from-git"
},
Expand All @@ -30,8 +32,8 @@
]
},
"devDependencies": {
"@pob/commitlint-config": "1.1.3",
"@pob/root": "2.4.5",
"@pob/commitlint-config": "2.0.0",
"@pob/root": "3.0.0",
"eslint": "7.13.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-airbnb-base": "14.2.1",
Expand Down
5 changes: 1 addition & 4 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": [
"config:js-lib",
"@pob"
]
"extends": ["config:js-lib", "@pob"]
}
41 changes: 24 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1340,21 +1340,21 @@ __metadata:
languageName: node
linkType: hard

"@pob/commitlint-config@npm:1.1.3":
version: 1.1.3
resolution: "@pob/commitlint-config@npm:1.1.3"
"@pob/commitlint-config@npm:2.0.0":
version: 2.0.0
resolution: "@pob/commitlint-config@npm:2.0.0"
dependencies:
"@commitlint/config-conventional": ^11.0.0
checksum: 55ca558239aa399fa91ba3ce975c1bd1f9832afe02dbd0319a3a6e32f2ff92b80a6bb0e89f46aab8a37df7305a27db1bda6938709be58605589ab4d35109f677
checksum: e01f667a29dd957532dc4ceafc184e602c56525d95709e65590bc6f57543f9887a92d958ee974c39f58e34955dd979a1ee97e5b18aac9fae6d29657452eaa044
languageName: node
linkType: hard

"@pob/eslint-config-monorepo@workspace:.":
version: 0.0.0-use.local
resolution: "@pob/eslint-config-monorepo@workspace:."
dependencies:
"@pob/commitlint-config": 1.1.3
"@pob/root": 2.4.5
"@pob/commitlint-config": 2.0.0
"@pob/root": 3.0.0
eslint: 7.13.0
eslint-config-airbnb: 18.2.1
eslint-config-airbnb-base: 14.2.1
Expand All @@ -1374,6 +1374,7 @@ __metadata:
resolution: "@pob/eslint-config-node@workspace:@pob/eslint-config-node"
dependencies:
"@pob/use-eslint-plugin": ^41.0.0
eslint: 7.13.0
eslint-plugin-node: ^11.1.0
peerDependencies:
eslint: ^7.5.0
Expand All @@ -1389,6 +1390,7 @@ __metadata:
resolution: "@pob/eslint-config-typescript-node@workspace:@pob/eslint-config-typescript-node"
dependencies:
"@pob/use-eslint-plugin": ^41.0.0
eslint: 7.13.0
eslint-plugin-node: ^11.1.0
peerDependencies:
eslint: ^7.5.0
Expand All @@ -1407,6 +1409,7 @@ __metadata:
resolution: "@pob/eslint-config-typescript-react@workspace:@pob/eslint-config-typescript-react"
dependencies:
"@pob/eslint-config": ^41.0.3
eslint: 7.13.0
eslint-config-airbnb: ^18.2.1
eslint-config-prettier: ^6.11.0
eslint-plugin-jsx-a11y: ^6.4.1
Expand Down Expand Up @@ -1436,6 +1439,7 @@ __metadata:
"@pob/use-eslint-plugin": ^41.0.0
"@typescript-eslint/eslint-plugin": ^4.1.1
"@typescript-eslint/parser": ^4.1.1
eslint: 7.13.0
eslint-config-airbnb-base: ^14.2.1
eslint-config-prettier: ^6.11.0
eslint-plugin-import: ^2.22.1
Expand Down Expand Up @@ -1463,6 +1467,7 @@ __metadata:
resolution: "@pob/eslint-config@workspace:@pob/eslint-config"
dependencies:
"@pob/use-eslint-plugin": ^41.0.0
eslint: 7.13.0
eslint-config-airbnb-base: ^14.2.1
eslint-config-prettier: ^6.11.0
eslint-plugin-unicorn: ^23.0.0
Expand All @@ -1478,31 +1483,33 @@ __metadata:
languageName: unknown
linkType: soft

"@pob/root@npm:2.4.5":
version: 2.4.5
resolution: "@pob/root@npm:2.4.5"
"@pob/root@npm:3.0.0":
version: 3.0.0
resolution: "@pob/root@npm:3.0.0"
dependencies:
"@commitlint/cli": 11.0.0
cross-env: ^7.0.2
lint-staged: 10.5.1
repository-check-dirty: ^1.2.2
repository-check-dirty: ^2.0.0
semver: ^7.1.2
which-pm-runs: 1.0.0
yarn-deduplicate: 3.1.0
yarnhook: ^0.4.3
peerDependencies:
husky: ^3.0.4 || ^4.2.3
husky: ^4.2.3
bin:
commitlint: bin/commitlint.js
lint-staged: bin/lint-staged.js
repository-check-dirty: bin/repository-check-dirty.js
checksum: e0651e5da1c8a1ac086be229261de69f983543b7bd73f52f8908e39628b65d3d337418e513db5300a7cb5acc89f3dce7ab07c1f58b55d6c6e2f2394f8af551b1
checksum: a6f75b699c5ddfeef12393700ded3f66710a82a21d23f18b25d3ddf847629caacfad2b22c75d03a8d20d5d1d95187f636a2004037961e88120921b3839fc200d
languageName: node
linkType: hard

"@pob/use-eslint-plugin@^41.0.0, @pob/use-eslint-plugin@workspace:@pob/use-eslint-plugin":
version: 0.0.0-use.local
resolution: "@pob/use-eslint-plugin@workspace:@pob/use-eslint-plugin"
dependencies:
eslint: 7.13.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -7487,12 +7494,12 @@ __metadata:
languageName: node
linkType: hard

"repository-check-dirty@npm:^1.2.2":
version: 1.2.2
resolution: "repository-check-dirty@npm:1.2.2"
"repository-check-dirty@npm:^2.0.0":
version: 2.0.0
resolution: "repository-check-dirty@npm:2.0.0"
bin:
repository-check-dirty: ./bin/repository-check-dirty.js
checksum: e2e057f408119d22b10adbb3d26bfc28073df80abf8027bdf501366cb047412d824cbdc8dda852188e172a56b762c63321bb5e1fd509190143a2ff8f8930407e
repository-check-dirty: bin/repository-check-dirty.js
checksum: b203e3b9f1d8c516976432e0af8dd850d167fba488e3bd4b30bc652c5e6adf94ba66b25617464cf88f84445f60f81130bf50ce612179a16a921f5ee1f4362628
languageName: node
linkType: hard

Expand Down

0 comments on commit f2d3b30

Please sign in to comment.