From e8cfc33513ef50163460afceaeefa9576fa548db Mon Sep 17 00:00:00 2001 From: tjcouch-sil Date: Thu, 4 Jan 2024 12:04:44 -0600 Subject: [PATCH] Added 'shared with' statements to various style files and brought them in sync --- .eslintignore | 4 ++++ .eslintrc.js | 20 ++++++++++++++++---- .gitignore | 4 ++++ .prettierignore | 4 ++++ .prettierrc.js | 4 ++++ .stylelintignore | 4 ++++ .stylelintrc.js | 4 ++++ 7 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.eslintignore b/.eslintignore index 3ec84fe..bdb2e12 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,5 @@ +# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.eslintignore + # Please keep this file in sync with .prettierignore and .stylelintignore # Logs @@ -29,3 +31,5 @@ temp-build # generated files package-lock.json + +# #endregion diff --git a/.eslintrc.js b/.eslintrc.js index fbc88e4..0191503 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,5 @@ +// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.eslintrc.cjs + module.exports = { extends: [ // https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js @@ -9,8 +11,8 @@ module.exports = { ], rules: { - // #region From paranext-core root .eslintrc.js - // Some rules are commented out since they have overrides in following sections + // Some rules in this following shared region are not applied since they are overridden in subsequent regions + // #region shared with https://github.com/paranext/paranext-core/blob/main/.eslintrc.js except certain overrides // #region ERB rules @@ -18,7 +20,7 @@ module.exports = { // A temporary hack related to IDE not resolving correct package.json 'import/no-extraneous-dependencies': 'off', 'import/no-import-module-exports': 'off', - // 'import/no-unresolved': 'error', + 'import/no-unresolved': 'error', 'react/jsx-filename-extension': 'off', 'react/react-in-jsx-scope': 'off', @@ -67,6 +69,7 @@ module.exports = { 'error', { functions: false, allowNamedExports: true, typedefs: false, ignoreTypeReferences: true }, ], + '@typescript-eslint/no-unnecessary-type-assertion': 'error', 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': 'error', 'no-useless-constructor': 'off', @@ -93,7 +96,7 @@ module.exports = { // #endregion - // #region Overrides shared with paranext-multi-extension-template .eslintrc.cjs + // #region Overrides to rules from paranext-core 'import/no-unresolved': ['error', { ignore: ['@papi'] }], @@ -103,6 +106,13 @@ module.exports = { globalThis: 'readonly', }, overrides: [ + { + // Allow this file to have overrides to rules from paranext-core + files: ['.eslintrc.*js'], + rules: { + 'no-dupe-keys': 'off', + }, + }, { files: ['*.js'], rules: { @@ -143,3 +153,5 @@ module.exports = { }, }, }; + +// #endregion diff --git a/.gitignore b/.gitignore index e2d717e..cb00ea2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.gitignore + # Logs logs *.log @@ -27,3 +29,5 @@ dist-ssr # Temporary intermediate build files temp-build + +# #endregion diff --git a/.prettierignore b/.prettierignore index 03f6570..69fb5a8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,5 @@ +# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.prettierignore + # Please keep this file in sync with .eslintignore and .stylelintignore # Logs @@ -29,3 +31,5 @@ temp-build # generated files package-lock.json + +# #endregion diff --git a/.prettierrc.js b/.prettierrc.js index ae319d5..01e5ca2 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,3 +1,5 @@ +// #region shared with https://github.com/paranext/paranext-core/blob/main/.prettierrc.js and https://github.com/paranext/paranext-multi-extension-template/blob/main/.prettierrc.js + module.exports = { tabWidth: 2, trailingComma: 'all', @@ -13,3 +15,5 @@ module.exports = { }, ], }; + +// #endregion diff --git a/.stylelintignore b/.stylelintignore index dffbdf4..6d59d79 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,3 +1,5 @@ +# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.stylelintignore + # Please keep this file in sync with .eslintignore and .prettierignore # Logs @@ -29,3 +31,5 @@ temp-build # generated files package-lock.json + +# #endregion diff --git a/.stylelintrc.js b/.stylelintrc.js index e143daa..5954945 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -1,3 +1,5 @@ +// #region shared with https://github.com/paranext/paranext-core/blob/main/.stylelintrc.js and https://github.com/paranext/paranext-multi-extension-template/blob/main/.stylelintrc.cjs + module.exports = { extends: ['stylelint-config-recommended', 'stylelint-config-sass-guidelines'], overrides: [ @@ -15,3 +17,5 @@ module.exports = { 'selector-max-id': 1, }, }; + +// #endregion