From 4d26488f548519cbc3becf95e76db071c2ff68cf Mon Sep 17 00:00:00 2001 From: ashuvssut Date: Mon, 31 May 2021 12:16:48 +0530 Subject: [PATCH] Add Linters config files --- .eslintrc.js | 48 ++++++++++++++++++++++++------------------------ .prettierignore | 9 +++++++++ .prettierrc.js | 15 +++++++++++++++ 3 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.js diff --git a/.eslintrc.js b/.eslintrc.js index 8060dff9..fb7e9d10 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,26 +1,26 @@ module.exports = { - env: { - browser: true, - es2021: true, - node: true, - jest: true, - }, - extends: ["eslint:recommended", "plugin:react/recommended"], - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - ecmaVersion: 12, - sourceType: "module", - }, - plugins: ["react"], - rules: { - "react/prop-types": "off", - "no-mixed-spaces-and-tabs": 0, - "react/no-unescaped-entities": 0, - indent: ["error", "tab"], - "linebreak-style": ["error", "unix"], - quotes: ["error", "double"], - semi: ["error", "always"], - }, + env: { + browser: true, + es2021: true, + node: true, + jest: true, + }, + extends: ["eslint:recommended", "plugin:react/recommended"], + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + ecmaVersion: 12, + sourceType: "module", + }, + plugins: ["react"], + rules: { + "react/prop-types": "off", + "no-mixed-spaces-and-tabs": 0, + "react/no-unescaped-entities": 0, + indent: ["error", "tab", { SwitchCase: 1 }], + "linebreak-style": ["error", "unix"], + quotes: ["error", "double"], + semi: ["error", "always"], + }, }; diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..15f2dbbc --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +# Ignore: +build +/public/images +/public/favicon +/public/*.png +/public/*.jpg +src/fonts +.gitignore +.prettierignore diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 00000000..bdc1c5a8 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,15 @@ +module.exports = { + bracketSpacing: true, + jsxBracketSameLine: false, + singleQuote: false, + trailingComma: 'all', + arrowParens: 'avoid', + parser: 'json5', + endOfLine: 'lf', + embeddedLanguageFormatting: 'auto', + printWidth: 80, + proseWrap: "preserve", + tabWidth: 2, + semi : true, + useTabs: true, +};