From e66afa5d8d87ee6b60ecf5ba531a6ec6f71bb5ba Mon Sep 17 00:00:00 2001 From: Adam Alston Date: Sun, 3 Dec 2023 12:08:27 -0500 Subject: [PATCH] feat(config): migrate files for commonjs compatibility (#64) --- .eslintrc.cjs | 2 +- lint-staged.config.js => .lintstagedrc.cjs | 2 +- .prettierrc | 4 ---- .prettierrc.cjs | 5 +++++ 4 files changed, 7 insertions(+), 6 deletions(-) rename lint-staged.config.js => .lintstagedrc.cjs (84%) delete mode 100644 .prettierrc create mode 100644 .prettierrc.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs index cbd92747d..c41786b76 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -2,6 +2,6 @@ module.exports = { extends: 'react-app', rules: { eqeqeq: 'error', - 'no-console': 'error', }, + ignorePatterns: ['!*.cjs'], }; diff --git a/lint-staged.config.js b/.lintstagedrc.cjs similarity index 84% rename from lint-staged.config.js rename to .lintstagedrc.cjs index cb3f98207..3905b6818 100644 --- a/lint-staged.config.js +++ b/.lintstagedrc.cjs @@ -1,5 +1,5 @@ module.exports = { - '*.{js,jsx,ts,tsx}': [ + '*.{cjs,js,jsx,ts,tsx}': [ 'eslint --cache --fix --max-warnings 0', 'prettier --cache --write', ], diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 2bcad54dd..000000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "arrowParens": "always", - "singleQuote": true -} diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 000000000..833ecb15f --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,5 @@ +/** @type {import("prettier").Config} */ +module.exports = { + arrowParens: 'always', + singleQuote: true, +};