Replies: 1 comment
-
以上配置的话,在我项目中就不能提供检查了,需要像以下这样配置,对我的项目才有检查效果。 import antfu from '@antfu/eslint-config';
export default antfu(
{
ignores: [
'.vscode',
'**/.vscode/**',
'build/*.js',
'build/*.js/**',
'src/assets',
'src/assets/**',
'public',
'**/public/**',
'dist',
'**/dist/**',
'node_modules',
'**/node_modules/**',
'pnpm-lock.yaml',
'**/pnpm-lock.yaml/**',
'**/*.d.ts'
],
formatters: true,
unocss: true,
vue: true,
typescript: true,
stylistic: {
indent: 2, // 4, or 'tab'
quotes: 'single', // or 'double'
semi: true // or false
},
rules: {
'no-unused-vars': 'error',
'no-undef': 'off',
'no-console': 'warn',
'antfu/if-newline': 'off',
'style/comma-dangle': ['error', 'never']
}
}
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
1.项目是vue3+vite+ts5,eslint.config.ts这样配置eslint的话,就不会生效,eslint.config.js就能生效,是我哪里配置有问题莫
2.我现在项目的eslint配置文件是eslint.config.js,以下是我的配置,但是ignores似乎没有生效,我忽略了该项目下的md文件,但是我打开md文件的时候,也会被检查到,恳请大佬看看是不是我配置有问题。
Beta Was this translation helpful? Give feedback.
All reactions