Skip to content

Instantly share code, notes, and snippets.

@dypsilon
Created May 30, 2023 21:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dypsilon/2c089bbb3d472a3f806b365607e4086b to your computer and use it in GitHub Desktop.
Save dypsilon/2c089bbb3d472a3f806b365607e4086b to your computer and use it in GitHub Desktop.
TypeScript ESLint Prettier Setup
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"prettier/prettier": "error"
},
"ignorePatterns": ["dist/"]
}
{
"singleQuote": true,
"semi": true,
"useTabs": true,
"tabWidth": 2,
"printWidth": 120
}
{
"editor.insertSpaces": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
{
"name": "ts-rnd",
"version": "1.0.0",
"description": "",
"main": "src/index.ts",
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/node": "^20.2.5",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}
{
"compilerOptions": {
"target": "ESNext",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist",
"lib": ["es2021"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment