0.2.11 • Published 6 months ago
@dylanjs/eslint-config v0.2.11
eslint+prettier包
使用:
pnpm install eslint @dylanjs/eslint-config -D
项目根目录下创建eslint.config.js
文件:
import { defineConfig } from '@dylanjs/eslint-config'
export default defineConfig({
vue: true,
react: { files: ['**/*react.tsx'] },
solid: { files: ['**/*solid.tsx'] },
svelte: true,
astro: true,
unocss: true,
formatter: {
html: true,
css: true,
json: true,
markdown: true,
yaml: true,
toml: true
},
overrides: {
'vue/multi-word-component-names': [
'warn',
{
ignores: ['index', 'App', '[id]']
}
]
}
})
注意
如果在项目中执行lint
命令使用报错Error: Cannot find package 'prettier-plugin-jsdoc' imported from C:\Users\my466\Desktop\demo\noop.js
需要在项目根目录中创建.npmrc
文件,添加如下内容:
shamefully-hoist=true
这个命令的作用是将依赖项提升到项目的根目录中,这样就可以在项目中使用这些依赖项了。
然后就可以使用了。
0.2.11
6 months ago
0.2.10
6 months ago
0.2.7
12 months ago
0.2.6
12 months ago
0.2.9
6 months ago
0.2.8
12 months ago
0.2.5
12 months ago
0.2.4
12 months ago
0.2.3
12 months ago
0.2.1
12 months ago
0.2.0
1 year ago
0.2.2
12 months ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago