From d54ed5577d853829970ac96cd0db25502ccac171 Mon Sep 17 00:00:00 2001 From: Julian Meinking <12785972+DrJume@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:32:43 +0200 Subject: [PATCH] fix(eslint): enforce camelCase for composables and PascalCase for components, kebab-case otherwise --- packages/eslint-config/index.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index e4c9902..7f4103e 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -62,10 +62,7 @@ export function eslintConfig({ nuxt = false, tsconfigPath, unicorn = false, conf 'unicorn/filename-case': [ 'error', { - cases: { - kebabCase: true, - pascalCase: true, - }, + case: 'kebabCase', ignore: [/^README\./], }, ], @@ -76,6 +73,20 @@ export function eslintConfig({ nuxt = false, tsconfigPath, unicorn = false, conf 'unicorn/catch-error-name': ['error', { name: 'err' }], }, }, + { + name: 'falcondev/unicorn/overrides', + files: ['**/composables/**/*'], + rules: { + 'unicorn/filename-case': ['error', { case: 'camelCase' }], + }, + }, + { + name: 'falcondev/unicorn/overrides', + files: ['**/components/**/*'], + rules: { + 'unicorn/filename-case': ['error', { case: 'pascalCase' }], + }, + }, { name: 'falcondev/unicorn/ignore', files: ['.github/**/*', '**/prisma/migrations/**/*', '**/db/migrations/meta/**/*'],