docs: Added eslint markdown plugin and fixed all critical errors#414
docs: Added eslint markdown plugin and fixed all critical errors#414
Conversation
| 'react-hooks/rules-of-hooks': 'off', | ||
| 'react/jsx-no-undef': 'off', | ||
| '@typescript-eslint/no-unused-vars': 'warn', | ||
| 'camelcase': 'warn', |
There was a problem hiding this comment.
to tylko dlatego, że wywalało sie jakieś jedno randomo miejsce w TextEmbeddingsModule.md, nie chce mi się rozkminiać dlaczego więc errcor -> warning chwilowo
There was a problem hiding this comment.
Could you write wich line caused the error?
There was a problem hiding this comment.
You can use // eslint-disable-next-line camelcase for only this line
There was a problem hiding this comment.
It will be visible in docs then. I'd say we don't want
import {
TextEmbeddingsModule,
ALL_MINILM_L6_V2,
// eslint-disable-next-line
All_MINILM_L6_V2_TOKENIZER,
} from 'react-native-executorch';
// Loading the model
await TextEmbeddingsModule.load(ALL_MINILM_L6_V2, All_MINILM_L6_V2_TOKENIZER);
// Running the model
const embedding = await TextEmbeddingsModule.forward('Hello World!');in our docs right?
There was a problem hiding this comment.
yep, not the cleanest look, especially since it is not an error present in the code itself
|
|
||
| ```typescript | ||
| modelSource: 'file::///var/mobile/.../llama3_2.pte', | ||
| modelSource: 'file::///var/mobile/.../llama3_2.pte'; |
There was a problem hiding this comment.
this doesn't seem correct, maybe add some more code around this to make this correct
There was a problem hiding this comment.
I've added useExecutorchModule so it feels more natural
|
|
||
| // Rest of your code... | ||
| const mySpanishAudio = ...; | ||
| const mySpanishAudio = 'https://some-audio-url.com/spanish-file.mp3'; |
There was a problem hiding this comment.
either do this way or '...' like below to keep it consistent
## Description Added eslint markdown plugin to format code blocks in docs using our eslint config. I corrected critical errors (mostly "...") so blocks are correctly formatted. It also generates a lot of new warnings (`no-unused-vars`) - we can safely ignore most of them, but when you produce new piece of docs you should monitor them, if they can be safely ignored, or did you misspell the variable you declared before that. We cannot enable `no-undef-vars` because it produces too many warnings (every JSX tag etc.), so we have to rely on those `no-unused-vars` warnings: <img width="999" alt="Screenshot 2025-06-23 at 12 56 40" src="https://github.com/user-attachments/assets/c2335831-b48d-433c-8077-5dfcb2b29c16" /> ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] Documentation update (improves or adds clarity to existing documentation) ### Related issues <!-- Link related issues here using #issue-number --> ### Checklist - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have updated the documentation accordingly - [ ] My changes generate no new warnings - they do ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->

Description
Added eslint markdown plugin to format code blocks in docs using our eslint config.
I corrected critical errors (mostly "...") so blocks are correctly formatted.
It also generates a lot of new warnings (
no-unused-vars) - we can safely ignore most of them, but when you produce new piece of docs you should monitor them, if they can be safely ignored, or did you misspell the variable you declared before that. We cannot enableno-undef-varsbecause it produces too many warnings (every JSX tag etc.), so we have to rely on thoseno-unused-varswarnings:Type of change
Related issues
Checklist
Additional notes