Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignores not work as expected #394

Closed
5 tasks done
brokuka opened this issue Jan 14, 2024 · 5 comments
Closed
5 tasks done

Ignores not work as expected #394

brokuka opened this issue Jan 14, 2024 · 5 comments

Comments

@brokuka
Copy link

brokuka commented Jan 14, 2024

Describe the bug

Prop ignores not working as expected and i'm getting eslint comment errors when not need

Reproduction

https://github.com/brokuka/antfu-ignores-issue

Check ~/generated/api/client.ts to see if there is an error. Generated by pnpm run generate:api.

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (6) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz
    Memory: 165.75 MB / 15.92 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.14.1 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (120.0.2210.133)
    Internet Explorer: 11.0.19041.3636

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@brokuka
Copy link
Author

brokuka commented Jan 14, 2024

Problem with relative paths. @antfu fix please in the readme, thank you.

@phk422
Copy link

phk422 commented Jan 15, 2024

I had the same problem

@yandixuan
Copy link
Contributor

@brokuka try '**/generated/**/*.ts'

@antfu antfu closed this as completed in 20a1d6d Jan 17, 2024
@saidinusah
Copy link

hello guys, facing this same issue. This is my eslint config

`import antfu from '@antfu/eslint-config'

export default antfu({
ignores: [
'./api-reference/*.ts',
'./components/modules/teller/',
'./pages/teller/
',
'./pages/utilities/',
'./pages/customer-service/cheque-management/
',
'./pages/retail-banking/cheque-management/',
'/components/modals/billing/
',
'./components/ui/form/**',
],
rules: {
'vue/custom-event-name-casing': 'off',
'no-console': ['error', { allow: ['warn', 'info'] }],
'eslint-comments/no-unlimited-disable': 'off',
'vue/no-export-in-script-setup': 'warn',
'symbol-description': 'warn',
},
})
`

@codeflorist
Copy link

codeflorist commented Feb 14, 2024

@antfu
i want to ignore the public folder.

i'm trying this in my config:

export default antfu({
	ignores: [
		'**/public/**',
		'**/public/**/*',
		'public/**',
		'public/**/*',
	],
        ...

nothing seems to be working.

EDIT:
the problem is with using rules in conjunction with ignores. in this case, both are ignored. i've opened a new issue: #403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants