Skip to content

Instantly share code, notes, and snippets.

@JoshuaSkootsky
Created January 27, 2020 05:00
Show Gist options
  • Save JoshuaSkootsky/767c4e8a4aece255b1e91f1ac7065a9c to your computer and use it in GitHub Desktop.
Save JoshuaSkootsky/767c4e8a4aece255b1e91f1ac7065a9c to your computer and use it in GitHub Desktop.
// npm i -D eslint eslint-config-prettier eslint-plugin-prettier prettier
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true
},
extends: ['eslint:recommended', 'prettier'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018
},
"plugins": [
"prettier"
],
rules: {
'prettier/prettier': [
// customizing prettier rules (unfortunately not many of them are customizable)
'error',
{
singleQuote: true,
trailingComma: 'all'
}
],
eqeqeq: ['error', 'always'] // adding some custom ESLint rules
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment