From 36d343b5da8d391d40ff4c24860561ea15d6c19b Mon Sep 17 00:00:00 2001 From: Josh Creek Date: Sun, 25 Oct 2020 22:16:22 +0000 Subject: [PATCH] feat(*): Add code formatting restrictions --- .editorconfig | 12 ++++++++++++ .eslintrc.json | 25 +++++++++++++++++++++++++ .prettierrc | 4 ++++ 3 files changed, 41 insertions(+) create mode 100644 .editorconfig create mode 100644 .eslintrc.json create mode 100644 .prettierrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4d32390 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +end_of_line = crlf +# editorconfig-tools is unable to ignore longs strings or urls +max_line_length = null diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bce04da --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,25 @@ +{ + "env": { + "browser": true, + "node": true, + "es2020": true, + "jquery": true + }, + "extends": [ + "airbnb", + "prettier", + "plugin:node/recommended" + ], + "plugins": [ + "prettier" + ], + "rules": { + "prettier/prettier": [ + "error" + ], + "linebreak-style": 2, + "no-unused-vars": "warn", + "no-param-reassign": "off", + "no-alert": "warn" + } +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..9d556c1 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "printWidth": 100, + "singleQuote": true +}