@prowise/eslint-config-linting-rules 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@prowise/eslint-config-linting-rules","version":"1.0.8","description":"Default Prowise linting rules for npm packages.","main":"index.js","exports":{"./default":"./index.js","./typescript":"./typescript.js","./backend":"./backend.js","./frontend":"./frontend.js"},"scripts":{"lint":"eslint **/*.js"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/prowise/npm-linting-rules.git"},"author":"Prowise B.V.","license":"UNLICENSED","homepage":"https://bitbucket.org/prowise/npm-linting-rules#readme","dependencies":{"@typescript-eslint/eslint-plugin":"^5.48.1","@typescript-eslint/parser":"^5.48.1","confusing-browser-globals":"^1.0.11","eslint":"^8.31.0","eslint-import-resolver-typescript":"^3.5.3","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^27.2.1","eslint-plugin-jsdoc":"^39.6.4","eslint-plugin-node":"^11.1.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-react":"^7.32.0","eslint-plugin-react-hooks":"^4.6.0","object.assign":"^4.1.4"}}
1
+ {"name":"@prowise/eslint-config-linting-rules","version":"1.0.10","description":"Default Prowise linting rules for npm packages.","main":"index.js","exports":{"./default":"./index.js","./typescript":"./typescript.js","./backend":"./backend.js","./frontend":"./frontend.js"},"scripts":{"lint":"eslint **/*.js"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/prowise/npm-linting-rules.git"},"author":"Prowise B.V.","license":"UNLICENSED","homepage":"https://bitbucket.org/prowise/npm-linting-rules#readme","dependencies":{"@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","confusing-browser-globals":"^1.0.11","eslint":"^8.44.0","eslint-import-resolver-typescript":"^3.5.5","eslint-plugin-import":"^2.27.5","eslint-plugin-jest":"^27.2.2","eslint-plugin-jsdoc":"^46.4.3","eslint-plugin-node":"^11.1.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-react":"^7.32.2","eslint-plugin-react-hooks":"^4.6.0","object.assign":"^4.1.4"},"overrides":{"semver":"^7.5.3"}}
@@ -104,12 +104,6 @@ module.exports = {
104
104
  */
105
105
  "jsdoc/multiline-blocks": "warn",
106
106
 
107
- /**
108
- * Enforces a consistent padding of the block description ✅
109
- * https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-newline-after-description.
110
- */
111
- "jsdoc/newline-after-description": "warn",
112
-
113
107
  /**
114
108
  * This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block
115
109
  * https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-no-bad-blocks.
@@ -169,7 +163,7 @@ module.exports = {
169
163
  * tag descriptions are written in complete sentences
170
164
  * https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-description-complete-sentence.
171
165
  */
172
- "jsdoc/require-description-complete-sentence": "warn",
166
+ "jsdoc/require-description-complete-sentence": "off",
173
167
 
174
168
  /**
175
169
  * Requires that all functions have examples
@@ -763,5 +763,21 @@ module.exports = {
763
763
  prop: "ignore",
764
764
  },
765
765
  ],
766
+ // override the default typescript rule to allow PascalCase function names for function components in React
767
+ "@typescript-eslint/naming-convention": [
768
+ "error",
769
+ {
770
+ selector: "variable",
771
+ format: ["camelCase", "PascalCase", "UPPER_CASE"],
772
+ },
773
+ {
774
+ selector: "function",
775
+ format: ["camelCase", "PascalCase"],
776
+ },
777
+ {
778
+ selector: "typeLike",
779
+ format: ["PascalCase"],
780
+ },
781
+ ],
766
782
  },
767
783
  };
@@ -248,7 +248,7 @@ module.exports = {
248
248
  // Allow camelCase functions (23.2), and PascalCase functions (23.8)
249
249
  {
250
250
  selector: "function",
251
- format: ["camelCase", "PascalCase"],
251
+ format: ["camelCase"],
252
252
  },
253
253
  // Airbnb recommends PascalCase for classes (23.3), and although Airbnb does not make TypeScript
254
254
  // recommendations we are assuming this rule would similarly apply to anything "type like",