Skip to content

Instantly share code, notes, and snippets.

@TeamDman
Last active March 2, 2020 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TeamDman/daf0bebc7193c1de24e669183cb7695a to your computer and use it in GitHub Desktop.
Save TeamDman/daf0bebc7193c1de24e669183cb7695a to your computer and use it in GitHub Desktop.
ESLint + Prettier + Typescript setup
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": [
"plugin:vue/base",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
"plugins": ["prettier", "@typescript-eslint/eslint-plugin"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"prettier/prettier": "error"
}
}
{
"semi": true,
"trailingComma": "all",
"singleQuote": false,
"useTabs": true,
"no-var": true
}
{
"dependencies": {
"typescript": "^3.5.2"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-prettier": "^3.1.2",
"@typescript-eslint/eslint-plugin": "^2.16.0",
"@typescript-eslint/parser": "^2.16.0",
"prettier": "^1.19.1"
},
"scripts": {
"lint": "eslint --fix .",
}
}
npm install --save-dev eslint eslint-config-prettier eslint-plugin-prettier prettier @typescript-eslint/plugin @typescript-eslint/eslint-parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment