Skip to content

Instantly share code, notes, and snippets.

@SeiwonPark
Last active April 24, 2023 19:30
Show Gist options
  • Save SeiwonPark/356dbda825cdf34dd747ec7c4bf999bb to your computer and use it in GitHub Desktop.
Save SeiwonPark/356dbda825cdf34dd747ec7c4bf999bb to your computer and use it in GitHub Desktop.
eslint + prettier for typescript
module.exports = {
env: {
es2021: true,
node: true,
},
extends: ['prettier'],
overrides: [],
plugins: ['prettier'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'prettier/prettier': 'warn',
},
};
@SeiwonPark
Copy link
Author

{
  "name": "eslint with prettier",
  "version": "0.1.0",
  "description": "ESLint + Prettier",
  "main": "index.js",
  "scripts": {
    "lint": "eslint --ext **/*.js **/*.js",
    "lint:fix": "eslint --ext **/*.js --fix **/*.js",
    "format": "prettier --write **/*.js",
    "start": "node index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "SeiwonPark",
  "license": "ISC",
  "dependencies": {},
  "devDependencies": {
    "eslint": "^8.34.0",
    "eslint-config-prettier": "^8.6.0",
    "eslint-plugin-prettier": "^4.2.1",
    "prettier": "^2.8.4"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment