Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
run: npm run format:check

- name: Build
run: npm run build
run: npm run build
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
tags:
- "v*.*.*"
- 'v*.*.*'

concurrency:
group: publish-${{ github.ref }}
Expand Down Expand Up @@ -39,4 +39,4 @@ jobs:
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ import { UserSchema } from '@seamless-auth/types';
const user = UserSchema.parse(data);
```

User role schemas accept plain roles such as `admin` and colon-separated scoped roles such as
`admin:read` and `admin:write`. Whitespace, underscores, slashes, and backslashes are rejected.

### Infer types

```ts
Expand Down
29 changes: 21 additions & 8 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import prettier from 'eslint-config-prettier';

export default [
{
files: ['**/*.ts'],
ignores: ['dist', 'node_modules', 'coverage', '*.config.*'],
},

{
files: ['src/**/*.ts'],
ignores: ['src/**/*.test.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
Expand All @@ -15,16 +20,24 @@ export default [
'@typescript-eslint': tseslint,
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],

'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-explicit-any': 'warn',

'no-console': 'warn',

'@typescript-eslint/explicit-function-return-type': 'off',
},
},
{
files: ['src/**/*.test.ts'],
languageOptions: {
parser: tsParser,
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
'@typescript-eslint/no-unused-vars': 'error',
// no type-aware rules here
},
},

prettier,
];
Loading
Loading