Skip to content

Instantly share code, notes, and snippets.

@calendee
Created April 12, 2019 12:13
Show Gist options
  • Save calendee/a8930de9c1582b19c859272354334511 to your computer and use it in GitHub Desktop.
Save calendee/a8930de9c1582b19c859272354334511 to your computer and use it in GitHub Desktop.
TypeScript and Prettier Integration with `@typescript-eslint/parser`
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint", "prettier"],
"env": {
"jasmine": true,
"jest": true
},
"rules": {},
"parser": "@typescript-eslint/parser"
}
{
"singleQuote": false,
"semi": true,
"tabWidth": 2,
"trailingComma": "all"
}
module.exports = {
presets: [
[
"@babel/preset-env",
{
targets: {
node: "current"
}
}
]
]
};
{
"name": "abc123",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"lint": "eslint './src/**/*.ts'",
"lint:fix": "eslint './src/**/*.ts' --fix",
"test": "jest"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "*",
"@babel/preset-env": "*",
"@babel/preset-typescript": "*",
"@types/jest": "*",
"@typescript-eslint/eslint-plugin": "^1.6.0",
"@typescript-eslint/parser": "^1.6.0",
"babel-jest": "*",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-prettier": "^3.0.1",
"jest": "*",
"prettier": "^1.16.4"
},
"dependencies": {
"typescript": "*"
}
}
{
"compilerOptions": {
"module": "commonjs",
"outDir": "./dist/"
},
"include": [
"./src/"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment