Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 8 additions & 28 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,24 @@ import antfu from '@antfu/eslint-config'
import harlanzw from 'eslint-plugin-harlanzw'

export default antfu(
{ type: 'lib', vue: true },
...harlanzw({
base: { ignores: ['docs/**'] },
link: true,
nuxt: true,
vue: true,
}),
{
type: 'lib',
ignores: [
'CLAUDE.md',
'test/fixtures/**',
'playground/**',
'docs/**',
],
rules: {
'no-use-before-define': 'off',
'node/prefer-global/process': 'off',
'node/prefer-global/buffer': 'off',
'ts/explicit-function-return-type': 'off',
// bot matchers and robots.txt rules are built from user config at runtime
'e18e/prefer-static-regex': 'off',
},
},
{
files: ['**/test/**/*.ts', '**/test/**/*.js'],
rules: {
'ts/no-unsafe-function-type': 'off',
'no-console': 'off',
'antfu/no-top-level-await': 'off',
},
},
...harlanzw({ link: true, nuxt: true, vue: true }),
{
files: ['**/server/**/*.ts', '**/src/**/*.ts'],
rules: {
'harlanzw/vue-no-faux-composables': 'off',
'harlanzw/vue-require-composable-prefix': 'off',
},
},
{
files: ['examples/**/package.json'],
rules: {
'pnpm/json-enforce-catalog': 'off',
'pnpm/json-valid-catalog': 'off',
'pnpm/json-prefer-workspace-settings': 'off',
},
},
)
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ catalog:
consola: ^3.4.2
defu: ^6.1.7
eslint: ^10.8.0
eslint-plugin-harlanzw: ^0.17.1
eslint-plugin-harlanzw: ^0.19.2
firebase-functions: ^7.3.2
h3: ^1.15.11
happy-dom: ^20.11.1
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-bot-matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function generateBotMatcherModule(definitions: readonly BotCategoryDefini

return `// Generated by build.config.ts. Do not edit.

const defaultBotPattern = /(?=(?:${alternatives}))/g
const defaultBotPattern = /(?=${alternatives})/g
const botTargets: number[] = [${botTargets.join(', ')}]

export function matchDefaultBotTarget(value: string): number | undefined {
Expand Down
2 changes: 1 addition & 1 deletion src/generated-bot-matcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by build.config.ts. Do not edit.

const defaultBotPattern = /(?=(?:(googlebot)|(google\.com\/bot\.html)|(bingbot)|(msnbot)|(yandexbot)|(baiduspider)|(baidu\.com)|(duckduckbot)|(duckduckgo\.com)|(slurp)|(applebot)|(twitterbot)|(twitter)|(facebookexternalhit)|(facebook\.com)|(linkedinbot)|(linkedin)|(pinterestbot)|(pinterest)|(discordbot)|(discordapp)|(mj12bot)|(majestic12\.co\.uk\/bot)|(ahrefsbot)|(ahrefs\.com)|(semrushbot)|(semrush\.com\/bot)|(screaming frog)|(screamingfrog\.co\.uk)|(rogerbot)|(anthropic)|(claude)|(gptbot)|(openai\.com)|(google-extended)|(bytespider)|(diffbot)|(cohere)|(ccbot)|(commoncrawl\.org)|(perplexitybot)|(perplexity\.ai)|(bot)|(spider)|(crawler)|(scraper)|(phantomjs)|(headless)|(playwright)|(selenium)|(webdriver)|(puppeteer)|(python-requests)|(python)|(wget)|(curl)|(zgrab)|(masscan)|(nmap)|(insecure\.org)|(nikto)|(wpscan)|(scrapy)))/g
const defaultBotPattern = /(?=(googlebot)|(google\.com\/bot\.html)|(bingbot)|(msnbot)|(yandexbot)|(baiduspider)|(baidu\.com)|(duckduckbot)|(duckduckgo\.com)|(slurp)|(applebot)|(twitterbot)|(twitter)|(facebookexternalhit)|(facebook\.com)|(linkedinbot)|(linkedin)|(pinterestbot)|(pinterest)|(discordbot)|(discordapp)|(mj12bot)|(majestic12\.co\.uk\/bot)|(ahrefsbot)|(ahrefs\.com)|(semrushbot)|(semrush\.com\/bot)|(screaming frog)|(screamingfrog\.co\.uk)|(rogerbot)|(anthropic)|(claude)|(gptbot)|(openai\.com)|(google-extended)|(bytespider)|(diffbot)|(cohere)|(ccbot)|(commoncrawl\.org)|(perplexitybot)|(perplexity\.ai)|(bot)|(spider)|(crawler)|(scraper)|(phantomjs)|(headless)|(playwright)|(selenium)|(webdriver)|(puppeteer)|(python-requests)|(python)|(wget)|(curl)|(zgrab)|(masscan)|(nmap)|(insecure\.org)|(nikto)|(wpscan)|(scrapy))/g
const botTargets: number[] = [0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 256, 256, 257, 257, 258, 258, 259, 259, 260, 260, 512, 512, 513, 513, 514, 514, 515, 515, 516, 768, 769, 770, 770, 771, 773, 774, 776, 777, 777, 778, 778, 1024, 1025, 1026, 1027, 1280, 1284, 1282, 1283, 1283, 1284, 1536, 1536, 1537, 1538, 1792, 1793, 1794, 1794, 1795, 1796, 2048]

export function matchDefaultBotTarget(value: string): number | undefined {
Expand Down
Loading