Skip to content

Commit af2dd2c

Browse files
feat: add authentication feature
1 parent 3452f4b commit af2dd2c

File tree

24 files changed

+2429
-135
lines changed

24 files changed

+2429
-135
lines changed

eslint.config.mjs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { dirname } from 'path'
22
import { fileURLToPath } from 'url'
33
import { FlatCompat } from '@eslint/eslintrc'
44
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
5+
import unicorn from 'eslint-plugin-unicorn'
56

67
const __filename = fileURLToPath(import.meta.url)
78
const __dirname = dirname(__filename)
@@ -11,11 +12,40 @@ const compat = new FlatCompat({
1112
})
1213

1314
const eslintConfig = [
14-
...compat.extends('next/core-web-vitals', 'next/typescript', 'plugin:naming/recommended'),
15+
...compat.extends('next/core-web-vitals', 'next/typescript'),
1516
{
1617
ignores: ['node_modules/**', '.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
1718
},
19+
{
20+
plugins: {
21+
unicorn,
22+
},
23+
rules: {
24+
'unicorn/filename-case': [
25+
'error',
26+
{
27+
case: 'kebabCase',
28+
ignore: [
29+
// This rule applies to filenames, not directory names.
30+
// The original regexes `/^\[.*\]$/` and `/^\(.*\)$/` didn't work because
31+
// they don't account for file extensions (e.g., `.tsx`).
32+
33+
// This updated regex correctly matches dynamic segment files
34+
// like `[id].tsx` or `[...slug].tsx`.
35+
/^\[.*\]\..+$/,
1836

37+
// This is for the uncommon case where a file is named like a route group,
38+
// e.g., `(marketing).tsx`.
39+
/^\(.*\)\..+$/,
40+
41+
// This correctly ignores files that start with an underscore,
42+
// such as `_app.tsx` or private utility files.
43+
/^_/,
44+
],
45+
},
46+
],
47+
},
48+
},
1949
eslintPluginPrettierRecommended,
2050
]
2151

0 commit comments

Comments
 (0)