diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e8338d6..862050b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -286,7 +286,26 @@ module.exports = { 'error', { selector: 'default', - format: ['PascalCase', 'camelCase'], + format: ['PascalCase'], + leadingUnderscore: 'forbid', + trailingUnderscore: 'forbid', + }, + { + selector: 'variableLike', + format: ['camelCase'], + leadingUnderscore: 'forbid', + trailingUnderscore: 'forbid', + }, + { + selector: 'variable', + modifiers: ['const', 'global'], + format: ['UPPER_CASE'], + leadingUnderscore: 'forbid', + trailingUnderscore: 'forbid', + }, + { + selector: 'class', + format: ['PascalCase'], leadingUnderscore: 'forbid', trailingUnderscore: 'forbid', }, @@ -310,6 +329,27 @@ module.exports = { leadingUnderscore: 'forbid', trailingUnderscore: 'forbid', }, + { + selector: 'interface', + suffix: ['Interface'], + format: ['PascalCase'], + leadingUnderscore: 'forbid', + trailingUnderscore: 'forbid', + }, + { + selector: 'enum', + suffix: ['Enum'], + format: ['PascalCase'], + leadingUnderscore: 'forbid', + trailingUnderscore: 'forbid', + }, + { + selector: 'typeAlias', + suffix: ['Type'], + format: ['PascalCase'], + leadingUnderscore: 'forbid', + trailingUnderscore: 'forbid', + }, ], '@typescript-eslint/no-base-to-string': 'error', '@typescript-eslint/no-confusing-non-null-assertion': 'error', diff --git a/tsconfig.json b/tsconfig.json index 258cb8d..1ff2d07 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,8 @@ "alwaysStrict": true, "newLine": "lf", "resolveJsonModule": true, - "esModuleInterop": false, - "allowSyntheticDefaultImports": false, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "allowUnusedLabels": false,