Skip to content

Instantly share code, notes, and snippets.

@RareScrap
Created December 29, 2025 08:36
Show Gist options
  • Select an option

  • Save RareScrap/4c080beaa895e68bd14f5b18304e5b71 to your computer and use it in GitHub Desktop.

Select an option

Save RareScrap/4c080beaa895e68bd14f5b18304e5b71 to your computer and use it in GitHub Desktop.
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"settings": {
"import/resolver": {
// The problem is eslint-import-resolver-typescript doesn't support import aliases provided in tsconfig.json without this empty {} non-informative object
"typescript": {}
}
}
}
// src/index.ts
import { SomeClass } from '@somedir/SomeClass';
const someClass = new SomeClass()
console.log(someClass)
{
"name": "example",
"productName": "example",
"version": "1.0.0",
"main": "src/index.ts",
"scripts": {
"lint": "set ESLINT_USE_FLAT_CONFIG=false&& eslint --ext .ts,.tsx ."
},
"keywords": [],
"author": "rarescrap",
"license": "MIT",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "8.50.1",
"@typescript-eslint/parser": "8.50.1",
"eslint": "9.39.2",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-import": "2.32.0",
"typescript": "5.9.3"
}
}
// src/somedir/SomeClass.ts
export class SomeClass {}
{
"compilerOptions": {
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUnusedLocals": true,
"strictBindCallApply": true,
"strictBuiltinIteratorReturn": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": ".",
"module": "commonjs",
"moduleResolution": "node",
"paths": {
"*": ["node_modules/*"],
"@somedir/*": ["./src/somedir/*"]
},
"resolveJsonModule": true,
"outDir": "dist",
"removeComments": true,
"sourceMap": true,
"allowJs": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"target": "ES6",
"incremental": true,
"skipLibCheck": false
}
}

Comments are disabled for this gist.