All checks were successful
Frontend CI / build (push) Successful in 1m26s
### Description
#### Backend
- String and interger can be pass as `id` to `GET` `/post/{id}`
- For the posts existed, the default `semantic_id` for them will be `_id`. (e.g. `_1`, `_2`)
- Semantic ID should follow the rules:
1. It shouldn't be an integer
1. It should match the pattern: `^[0-9a-zA-Z_\-]+$`
<br>
|Semantic ID|Result|Note|
|-|-|-|
|12|X|against with `i`|
|-3|X|against with `i`|
|3.14|X|against with `ii`|
|hello world|X|against with `ii`|
|*EMPTY*|X|against with `ii`|
|12_34-56|O||
#### Frontend
- The href of post preview card becomes the semantic ID.
### Package Changes
```toml
regex = "1.12.1"
```
### Screenshots

### Reference
Resolves #125.
### Checklist
- [x] A milestone is set
- [x] The related issuse has been linked to this branch
Reviewed-on: #134
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
import prettier from 'eslint-config-prettier';
|
|
import { includeIgnoreFile } from '@eslint/compat';
|
|
import js from '@eslint/js';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import globals from 'globals';
|
|
import { fileURLToPath } from 'node:url';
|
|
import ts from 'typescript-eslint';
|
|
import svelteConfig from './svelte.config.js';
|
|
|
|
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
|
|
|
|
export default ts.config(
|
|
includeIgnoreFile(gitignorePath),
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
...svelte.configs.recommended,
|
|
prettier,
|
|
...svelte.configs.prettier,
|
|
{
|
|
languageOptions: {
|
|
globals: { ...globals.browser, ...globals.node },
|
|
},
|
|
rules: {
|
|
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
|
|
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
|
'no-undef': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
extraFileExtensions: ['.svelte'],
|
|
parser: ts.parser,
|
|
svelteConfig,
|
|
},
|
|
},
|
|
}
|
|
);
|