Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nekochan0122/config
NekoChan's config
https://github.com/nekochan0122/config
config eslint react stylistic typescript vscode-profile
Last synced: about 1 month ago
JSON representation
NekoChan's config
- Host: GitHub
- URL: https://github.com/nekochan0122/config
- Owner: nekochan0122
- License: mit
- Created: 2024-08-28T01:25:11.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-21T01:09:55.000Z (about 2 months ago)
- Last Synced: 2024-09-28T14:41:42.421Z (about 2 months ago)
- Topics: config, eslint, react, stylistic, typescript, vscode-profile
- Language: TypeScript
- Homepage:
- Size: 238 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @nekochan0122/config
```bash
pnpm i -D @nekochan0122/config
```## ESLint (Flat Config + TypeScript)
1. Install ESLint
```bash
pnpm i -D eslint typescript-eslint @eslint/js @eslint/compat @types/eslint__js
```2. Install Base Plugins
```bash
pnpm i -D globals @stylistic/eslint-plugin eslint-plugin-import eslint-plugin-simple-import-sort eslint-plugin-unicorn
```3. Use it
Base:
```js
import nekoConfig from '@nekochan0122/config/eslint'
import globals from 'globals'
import tseslint from 'typescript-eslint'export default tseslint.config(
...nekoConfig.presets.base,
{
languageOptions: {
globals: globals.browser, // choose the correct globals for ur project
},
rules: {
'@stylistic/indent': ['error', 4], // you can override rules in here
},
}
)
```React:
```bash
pnpm i -D eslint-plugin-react eslint-plugin-react-hooks@rc eslint-plugin-react-refresh eslint-plugin-jsx-a11y
``````js
import nekoConfig from '@nekochan0122/config/eslint'
import globals from 'globals'
import tseslint from 'typescript-eslint'export default tseslint.config(
...nekoConfig.presets.react,
{
languageOptions: {
globals: globals.browser,
},
}
)
```4. Update VSCode Settings (Optional)
```json
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
}
```> [!CAUTION]
> Do not use this config with Prettier or other formatter.## VSCode
1. Install Fonts
Editor
- [JetBrains Mono](https://www.jetbrains.com/lp/mono/)
- [Source Han Sans HW TC VF](https://github.com/adobe-fonts/source-han-sans/releases/tag/2.004R)Terminal
- [JetBrainsMono Nerd Font](https://www.nerdfonts.com/font-downloads)2. Download Profile
https://github.com/nekochan0122/config/blob/main/src/vscode
3. Import Profile
File -> Preferences -> Profile -> Import