Skip to content

Instantly share code, notes, and snippets.

@freeatnet
Created July 10, 2025 20:35
Show Gist options
  • Save freeatnet/51e5a1fc036dad001d0e6f76358a5408 to your computer and use it in GitHub Desktop.
Save freeatnet/51e5a1fc036dad001d0e6f76358a5408 to your computer and use it in GitHub Desktop.
export const MY_RULES = {
rules: {
"@typescript-eslint/consistent-type-assertions": [
"error",
{ assertionStyle: "never" },
],
"@typescript-eslint/consistent-type-definitions": "off", // No preference on type vs interface
"@typescript-eslint/consistent-type-exports": [
"warn",
{ fixMixedExportsWithInlineTypeSpecifier: true },
],
"@typescript-eslint/consistent-type-imports": [
"warn",
{
fixStyle: "inline-type-imports",
prefer: "type-imports",
},
],
"@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unnecessary-condition": [
"error",
{ allowConstantLoopConditions: true },
],
"@typescript-eslint/no-unsafe-assignment": ["warn"],
"@typescript-eslint/no-unused-expressions": [
"error",
{ allowShortCircuit: true, allowTernary: true },
],
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", caughtErrors: "none" },
],
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowAny: false,
allowBoolean: false,
allowNever: false,
allowNullish: false,
allowRegExp: false,
},
],
"import/first": "error",
"import/no-cycle": "error",
"import/no-duplicates": "error",
"import/order": [
"error",
{
alphabetize: {
caseInsensitive: true,
order: "asc",
},
groups: [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
],
"newlines-between": "always",
pathGroups: [
{
group: "internal",
pattern: "~/**",
position: "after",
},
],
},
],
"no-console": [
"warn",
{
allow: ["warn", "error"],
},
],
"no-empty": ["error", { allowEmptyCatch: true }],
"react/jsx-curly-brace-presence": "warn",
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment