Skip to content

Commit

Permalink
Merge pull request #41 from nimblehq/release/2.4.0
Browse files Browse the repository at this point in the history
Release `eslint-config-nimble` 2.4.0 and `eslint-config-nimble-react` 1.1.0
  • Loading branch information
carryall authored Jul 26, 2022
2 parents 767e334 + 21b394a commit 00eeaa0
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 158 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish packages to npmjs

on:
release:
types:
- published

jobs:
publish:
name: Publish packages

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node and restore cached dependencies
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: "npm"
registry-url: "https://registry.npmjs.org"
scope: "@nimblehq"

- name: Install dependencies
run: npm ci && lerna bootstrap --ci

- name: Publish packages to npmjs
run: npx lerna publish from-package --yes --no-verify-access
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
The configurations are separated into dedicated packages:

- [eslint-config-nimble](/packages/eslint-config-nimble): ESLint base rules
- [eslint-config-nimble-react](/packages/eslint-config-nimble-react): ESLint rules for React

__Usage information is in the packages' documentation.__

Expand All @@ -28,13 +29,11 @@ __Usage information is in the packages' documentation.__

### Publish packages

Use [`lerna publish`](https://github.com/lerna/lerna/tree/main/commands/publish#readme) command to publish packages.
- Packages will be published to npmjs automatically after publishing a new release.

```bash
lerna publish
```
- Need to set the version in `/packages/**/package.json` before creating the release.

_The current branch that you run the publish command should be pushed on Github._
- More details in [publish workflow](/.github/workflows/publish.yml). This workflow uses [`lerna publish`](https://github.com/lerna/lerna/tree/main/commands/publish#readme) command to publish packages.

### Run commands

Expand Down
94 changes: 64 additions & 30 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions packages/eslint-config-nimble-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nimblehq/eslint-config-nimble-react",
"version": "1.0.0",
"version": "1.1.0",
"description": "ESLint React configuration developed and maintained by Nimble",
"keywords": [
"eslint",
Expand All @@ -19,11 +19,11 @@
"lib"
],
"dependencies": {
"@nimblehq/eslint-config-nimble": "^2.3.0",
"@nimblehq/eslint-config-nimble": "^2.4.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"eslint-plugin-testing-library": "^5.2.1"
Expand Down
4 changes: 1 addition & 3 deletions packages/eslint-config-nimble/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
extends: [
'./lib/index.js',
],
extends: ['./lib/index.js'],
};
1 change: 1 addition & 0 deletions packages/eslint-config-nimble/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = {
'./rules/typescript',
'./rules/import',
'./rules/testing',
'./rules/prettier', // prettiter must be the last one
].map(require.resolve),
rules: {},
};
Loading

0 comments on commit 00eeaa0

Please sign in to comment.