eslint-plugin-chencc
v1.0.1
Published
```mjs //eslint.config.mjs import antfu from '@antfu/eslint-config' import eslintPluginChencc from 'eslint-plugin-chencc' export default antfu({ formatters: { css: true, }, stylistic: { indent: 2, quotes: 'single', }, typ
Downloads
5
Readme
//eslint.config.mjs
import antfu from '@antfu/eslint-config'
import eslintPluginChencc from 'eslint-plugin-chencc'
export default antfu({
formatters: {
css: true,
},
stylistic: {
indent: 2,
quotes: 'single',
},
typescript: true,
// 注册插件
plugins: { chencc: eslintPluginChencc },
rules: {
// 关闭
'antfu/consistent-list-newline': 'off',
// 匹配字段名后缀
'chencc/multi-array': ['error', { v2: ['v2', 'v2f'], v3: ['v3'],v4:['v4','v4f'] }],
},
})
v2数组内部数据应该每2个排一排
const listv2=[
1,2,
3,4
]
const listv2f=[
1,2,
3,4
]
v3数组内部数据应该每3个排一排
const listv3=[
1,2,3,
3,4,5
]
v4数组内部数据应该每4个排一排
const listv4=[
1,2,3,4,
3,4,5,6
]