Skip to content

Instantly share code, notes, and snippets.

@Rem0ld
Created January 19, 2022 08:20
Show Gist options
  • Save Rem0ld/640c557c76a6b34dc078a3d5b29efec8 to your computer and use it in GitHub Desktop.
Save Rem0ld/640c557c76a6b34dc078a3d5b29efec8 to your computer and use it in GitHub Desktop.
Simple eslint and prettier config + dependencies in package.json so it will format on save
{
"env": {
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["prettier"],
"rules": {
"no-unused-vars": "warn",
"prettier/prettier": "error"
}
}
{
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 100,
"singleQuote": false,
"semi": true,
"arrowParens": "avoid",
"bracketSpacing": true
}
{
"dependencies": {
"eslint": "^8.5.0"
}
"devDependencies": {
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.5.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment