@prowise/eslint-config-linting-rules 1.0.7 → 1.0.9

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.7","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.9","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"}}
@@ -169,7 +169,7 @@ module.exports = {
169
169
  * tag descriptions are written in complete sentences
170
170
  * https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-description-complete-sentence.
171
171
  */
172
- "jsdoc/require-description-complete-sentence": "warn",
172
+ "jsdoc/require-description-complete-sentence": "off",
173
173
 
174
174
  /**
175
175
  * 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",