Installations
npm install eslint-config-blockabc
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.18.0
NPM Version
9.8.1
Score
46.7
Supply Chain
87.7
Quality
77.9
Maintenance
100
Vulnerability
95.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (92.06%)
Vue (6.61%)
TypeScript (1.33%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
BlockABC
Download Statistics
Total Downloads
9,073
Last Day
1
Last Week
5
Last Month
125
Last Year
1,162
GitHub Statistics
MIT License
3 Stars
92 Commits
1 Forks
5 Watchers
1 Branches
4 Contributors
Updated on Apr 15, 2022
Bundle Size
967.00 B
Minified
578.00 B
Minified + Gzipped
Package Meta Information
Latest Version
0.16.2
Package Id
eslint-config-blockabc@0.16.2
Unpacked Size
24.50 kB
Size
9.17 kB
File Count
20
NPM Version
9.8.1
Node Version
18.18.0
Published on
Nov 28, 2024
Total Downloads
Cumulative downloads
Total Downloads
9,073
Last Day
0%
1
Compared to previous day
Last Week
-88.9%
5
Compared to previous week
Last Month
108.3%
125
Compared to previous month
Last Year
-33.4%
1,162
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
13
Peer Dependencies
3
Dev Dependencies
5
eslint-config-blockabc
An All-in-One ESLint Shareable Config project, based on Standard Style.
This project including ESLint Config for JavaScript, TypeScript, Vue, Nuxt.
Usage
JavaScript
- install
1npm install eslint-config-blockabc eslint @babel/eslint-parser eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard -D
- Add this to your .eslintrc file
1{ 2 "extends": ["blockabc"] 3}
Typescript
Build on JavaScript:
1npm install typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser -D
1{ 2 "extends": ["blockabc/typescript"] 3}
Vue
Build on JavaScript:
1npm install vue-eslint-parser eslint-plugin-vue eslint-config-standard-jsx eslint-plugin-react -D
1{ 2 "extends": ["blockabc/vue"] 3}
Nuxt
Build on Vue:
1npm install eslint-plugin-nuxt -D
1{ 2 "extends": ["blockabc/nuxt"] 3}
Vue-TypeScript
Build on Vue & TypeScript
1{ 2 "extends": ["blockabc/vue-ts"] 3}
Nuxt-TypeScript
Build on Nuxt & TypeScript
1{ 2 "extends": ["blockabc/nuxt-ts"] 3}
FAQ
- Sequence in eslintrc's
extends
field is important. Your config should always be the last one inextends
array. https://github.com/eslint/eslint/issues/9191 - You can run
eslint --print-config [file]
to see active eslint rules for specific file.
Notable
Vue
- props 要有默认值
JavaScript
- 函数定义的括号之前要有空格。
除了社区规范和风格倾向,该规则可以方便代码搜索:搜 func(
可以搜到所有函数调用,搜 func (
可以搜到函数定义。
Todo
按理说 String 类型的 props 应该也可以没有默认值。可以给 eslint-plugin-vue 提一个 PR。
该规则要求插值的花括号两边有空格,但是是否是必须的呢?这样风格上的好处和坏处分别是什么?
- vue slots/event
可以增加一个规则,使得所有的 slots 和 events 都必须显式地在 vue 配置上写出,方便后续维护者知道该组件的 "API"。
1export default { 2 events: ['input', 'change'], 3 slots: ['default', 'title'], 4 mounted() { 5 this.$emit('input', 0) 6 } 7}
- vue/attributes-order
该规则有点奇怪,没有按照 order 的意图去排序,代码应该是有问题的,有时间可以去看一下,提个 PR。 attributes-order.js

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
3.5
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More