@@ -7,10 +7,10 @@ import { fileURLToPath } from 'node:url';
77import ts from 'typescript-eslint' ;
88import svelteConfig from './svelte.config.js' ;
99
10- const gitignorePath = fileURLToPath ( new URL ( './.gitignore' , import . meta. url ) ) ;
10+ const gitignore_path = fileURLToPath ( new URL ( './.gitignore' , import . meta. url ) ) ;
1111
1212export default ts . config (
13- includeIgnoreFile ( gitignorePath ) ,
13+ includeIgnoreFile ( gitignore_path ) ,
1414 js . configs . recommended ,
1515 ...ts . configs . recommended ,
1616 ...svelte . configs . recommended ,
@@ -24,6 +24,15 @@ export default ts.config(
2424 // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
2525 // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
2626 'no-undef' : 'off' ,
27+ '@typescript-eslint/naming-convention' : [
28+ 'error' ,
29+ {
30+ selector : [ 'variableLike' ] ,
31+ format : [ 'snake_case' , 'UPPER_CASE' ] ,
32+ leadingUnderscore : 'allow' ,
33+ } ,
34+ ] ,
35+ 'func-style' : [ 'error' , 'declaration' , { allowTypeAnnotation : true } ] ,
2736 } ,
2837 } ,
2938 {
0 commit comments