Skip to content

Instantly share code, notes, and snippets.

@andymantell
Last active July 20, 2022 12:43
Show Gist options
  • Save andymantell/058288dc66f657268e332cfc2dd6b136 to your computer and use it in GitHub Desktop.
Save andymantell/058288dc66f657268e332cfc2dd6b136 to your computer and use it in GitHub Desktop.
my prettier / eslint setup
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
node_modules/*
dist/*
bin/*
obj/*
Properties/*
module.exports = {
extends: ["airbnb-base/legacy", "plugin:prettier/recommended"],
parser: "@babel/eslint-parser",
parserOptions: {
requireConfigFile: false,
},
env: {
browser: true,
node: true,
jquery: true,
es6: true,
jest: true,
},
rules: {
"no-console": 0,
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
"no-unused-vars": [
"error",
{
argsIgnorePattern: "resolve|reject|err",
},
],
"no-plusplus": 0,
"no-underscore-dangle": 0,
"no-param-reassign": 0,
},
};
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@babel/eslint-parser": "^7.17.0",
"eslint": "^8.14.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.6.2"
}
}
@andymantell
Copy link
Author

Obviously the package.json is truncated, to only show the relevant bits

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