Skip to content

Commit

Permalink
eslint rule to avoid using v4 random uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
jpolavar committed Oct 22, 2024
2 parents dd66cb7 + 9aad006 commit 07d71de
Show file tree
Hide file tree
Showing 10 changed files with 1,372 additions and 1,518 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ on:
branches:
- 'main'

env:
CI: true

jobs:
pullRequestBuild:
name: Pull Request Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20.x', '22.x']
node-version: ['20.x', '22.x', '23.x']
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand All @@ -22,6 +25,10 @@ jobs:
cache: 'npm'
- name: Install Dependencies
run: npm ci --ignore-scripts
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Prepare
run: npm run prepare
- name: Compile
run: npm run ci:compile
- name: Check Code Style
Expand All @@ -36,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20.x', '22.x']
node-version: ['20.x', '22.x', '23.x']
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand All @@ -49,6 +56,10 @@ jobs:
cache: 'npm'
- name: Install Dependencies
run: npm ci --ignore-scripts
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Prepare
run: npm run prepare
- name: Compile
run: npm run ci:compile
- name: Check Code Style
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
allow-licenses: ${{ vars.ALLOW_LICENSES }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# eslint-config
# @checkdigit/eslint-config

Copyright (c) 2021-2024 [Check Digit, LLC](https://checkdigit.com)

Check Digit [ESLint](https://eslint.org/) configuration

### Install
## Install

```bash
$ npm i @checkdigit/eslint-config --save-dev
Expand All @@ -19,19 +17,20 @@ plugins that are supported by the configuration via `peerDependencies`.
{
// ...
"scripts": {
"lint": "eslint --max-warnings 0 --ignore-path .gitignore .",
"lint:fix": "eslint --ignore-path .gitignore . --fix",
"test": "... && npm run lint"
}
"eslintConfig": {
"extends": [
"@checkdigit/eslint-config"
]
}
"lint": "NODE_OPTIONS=\"--disable-warning ExperimentalWarning\" eslint --max-warnings 0 .",
"lint:fix": "NODE_OPTIONS=\"--disable-warning ExperimentalWarning\" eslint . --fix",
"test": "... && npm run lint",
},
// ...
}
```

### Example `eslint.config.mjs`

```javascript
import { default } from '@checkdigit/eslint-config';
```

## License

MIT
8 changes: 8 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import config from './index.mjs';

export default [
{
ignores: ['**/*.js', '**/*.mjs'],
},
...config,
];
Loading

0 comments on commit 07d71de

Please sign in to comment.