Skip to content

Commit

Permalink
Added 'shared with' statements to various style files and brought the…
Browse files Browse the repository at this point in the history
…m in sync
  • Loading branch information
tjcouch-sil committed Jan 4, 2024
1 parent 239acca commit e8cfc33
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -29,3 +31,5 @@ temp-build

# generated files
package-lock.json

# #endregion
20 changes: 16 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,16 +11,16 @@ 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

'import/extensions': 'off',
// 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',

Expand Down Expand Up @@ -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',
Expand All @@ -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'] }],

Expand All @@ -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: {
Expand Down Expand Up @@ -143,3 +153,5 @@ module.exports = {
},
},
};

// #endregion
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.gitignore

# Logs
logs
*.log
Expand Down Expand Up @@ -27,3 +29,5 @@ dist-ssr

# Temporary intermediate build files
temp-build

# #endregion
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -29,3 +31,5 @@ temp-build

# generated files
package-lock.json

# #endregion
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -13,3 +15,5 @@ module.exports = {
},
],
};

// #endregion
4 changes: 4 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -29,3 +31,5 @@ temp-build

# generated files
package-lock.json

# #endregion
4 changes: 4 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -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: [
Expand All @@ -15,3 +17,5 @@ module.exports = {
'selector-max-id': 1,
},
};

// #endregion

0 comments on commit e8cfc33

Please sign in to comment.