Gathering detailed insights and metrics for eslint-config-soybeanjs
Gathering detailed insights and metrics for eslint-config-soybeanjs
Gathering detailed insights and metrics for eslint-config-soybeanjs
Gathering detailed insights and metrics for eslint-config-soybeanjs
SoybeanJS's eslint flat config presets with prettier
npm install eslint-config-soybeanjs
Typescript
Module System
Node Version
NPM Version
TypeScript (93.49%)
Astro (3.72%)
JavaScript (1.24%)
HTML (0.65%)
Svelte (0.38%)
Vue (0.36%)
CSS (0.05%)
Less (0.05%)
SCSS (0.05%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
60 Stars
243 Commits
13 Forks
2 Watchers
2 Branches
6 Contributors
Updated on Jul 08, 2025
Latest Version
0.5.9
Package Id
eslint-config-soybeanjs@0.5.9
Unpacked Size
69.86 kB
Size
13.85 kB
File Count
17
NPM Version
10.2.3
Node Version
18.19.0
Published on
Jan 25, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
19
2
[!CAUTION] This is legacy config, ESlint will use new flat config by default when released 9.0.0, it's recommend to use new flat config on branch main
English | 中文
1pnpm i -D eslint typescript eslint-config-soybeanjs
create config file ".eslintrc"
1{ 2 "extends": "soybeanjs" 3}
please choose the suitable config for your project
You don't need .eslintignore normally as it has been provided by the preset.
set multi eslint configs in a project
For example, there are some tsx files written by Solid under the folder "solid", and there are some tsx files written by React under the folder "react", then you can create the eslint config file under the folder, which are "soybeanjs/solid" and "soybeanjs/react"
@/
, ~/
, etcit will read the path alias from tsconfig.json, the following code is default settings, as well as you can update by yourself
1{ 2 "settings": { 3 "import/resolver": { 4 "typescript": { 5 "project": [ 6 "tsconfig.json", 7 "packages/*/tsconfig.json", 8 "examples/*/tsconfig.json", 9 "docs/*/tsconfig.json" 10 ] 11 } 12 } 13 } 14}
1{ 2 "editor.codeActionsOnSave": { 3 "source.fixAll.eslint": true // auto format on save 4 }, 5 "editor.formatOnSave": false, 6 "eslint.validate": ["svelte", "astro", "json"] 7}
eslint.validate
: configure the file types to be validated, the default file types are js, jsx, ts, tsx, vue, if you want to validate other file types, you need to add them here (such as svelte, astro and json below)
the validate here is the validation of eslint plugin, which means to display the error in real time on the interface, and trigger auto fix by saving, which is different from auto fix by command eslint, you can specify the validate and fix file types by command
eslint --fix --ext .svelte
editor.formatOnSave
: close the editor's built-in formatting to avoid conflicts with eslint's formatting, of course, you can also enable the editor's built-in formatting for file types that do not pass eslint verification, such as the following configuration, the editor will automatically format html, css, less, scss, sass, markdown, yaml and yml files when saving
1{ 2 "editor.formatOnSave": false, 3 "[html][css][less][scss][sass][markdown][yaml][yml][jsonc]": { 4 "editor.defaultFormatter": "esbenp.prettier-vscode", 5 "editor.formatOnSave": true 6 } 7}
1{ 2 "scripts": { 3 "lint": "eslint . --fix" 4 } 5}
soy
is a command of dependency package @soybeanjs/cli
1pnpm lint
No vulnerabilities found.
No security vulnerabilities found.