Skip to content

Commit

Permalink
fix(eslint): enforce camelCase for composables and PascalCase for com…
Browse files Browse the repository at this point in the history
…ponents, kebab-case otherwise
  • Loading branch information
DrJume committed Jul 3, 2024
1 parent 7ca495b commit d54ed55
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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\./],
},
],
Expand All @@ -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/**/*'],
Expand Down

0 comments on commit d54ed55

Please sign in to comment.