Last active
March 2, 2020 16:13
-
-
Save TeamDman/daf0bebc7193c1de24e669183cb7695a to your computer and use it in GitHub Desktop.
ESLint + Prettier + Typescript setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"semi": true, | |
"trailingComma": "all", | |
"singleQuote": false, | |
"useTabs": true, | |
"no-var": true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 .", | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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