@prowise/eslint-config-linting-rules 2.1.2 → 2.1.4

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/front-react.js CHANGED
@@ -10,6 +10,7 @@ export default [
10
10
  react,
11
11
  vitest,
12
12
  {
13
+ plugins: { "@typescript-eslint": typescript.plugins["@typescript-eslint"] },
13
14
  settings: { react: { version: "detect" } },
14
15
  languageOptions: {
15
16
  globals: {
@@ -18,5 +19,23 @@ export default [
18
19
  SharedArrayBuffer: "readonly",
19
20
  },
20
21
  },
22
+ rules: {
23
+ // override the default typescript rule to allow PascalCase function names for function components in React
24
+ "@typescript-eslint/naming-convention": [
25
+ "error",
26
+ {
27
+ selector: "variable",
28
+ format: ["camelCase", "PascalCase", "UPPER_CASE"],
29
+ },
30
+ {
31
+ selector: "function",
32
+ format: ["camelCase", "PascalCase"],
33
+ },
34
+ {
35
+ selector: "typeLike",
36
+ format: ["PascalCase"],
37
+ },
38
+ ],
39
+ },
21
40
  },
22
41
  ];
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@prowise/eslint-config-linting-rules","version":"2.1.2","description":"Default Prowise linting rules for npm packages.","main":"index.js","type":"module","exports":{"./typescript":"./typescript.js","./backend":"./backend.js","./front-react":"./front-react.js","./front-solid":"./front-solid.js","./next":"./next.js"},"scripts":{"lint":"eslint","inspect":"eslint --inspect-config"},"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":{"@next/eslint-plugin-next":"^15.1.0","@stylistic/eslint-plugin":"^2.12.1","confusing-browser-globals":"^1.0.11","eslint":"^9.17.0","eslint-import-resolver-typescript":"^3.7.0","eslint-plugin-import-x":"^4.5.0","eslint-plugin-jest":"^28.9.0","eslint-plugin-jsdoc":"^50.6.1","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.15.0","eslint-plugin-prefer-arrow-functions":"^3.4.1","eslint-plugin-react":"^7.37.2","eslint-plugin-react-hooks":"^5.1.0","eslint-plugin-solid":"^0.14.5","eslint-plugin-vitest":"^0.5.4","globals":"^15.13.0","typescript-eslint":"^8.18.1"},"devDependencies":{"@eslint/config-inspector":"^0.6.0"}}
1
+ {"name":"@prowise/eslint-config-linting-rules","version":"2.1.4","description":"Default Prowise linting rules for npm packages.","main":"index.js","type":"module","exports":{"./typescript":"./typescript.js","./backend":"./backend.js","./front-react":"./front-react.js","./front-solid":"./front-solid.js","./next":"./next.js"},"scripts":{"lint":"eslint","inspect":"eslint --inspect-config"},"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":{"@next/eslint-plugin-next":"^15.1.0","@stylistic/eslint-plugin":"^2.12.1","confusing-browser-globals":"^1.0.11","eslint":"^9.17.0","eslint-import-resolver-typescript":"^3.7.0","eslint-plugin-import-x":"^4.5.0","eslint-plugin-jest":"^28.9.0","eslint-plugin-jsdoc":"^50.6.1","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.15.0","eslint-plugin-prefer-arrow-functions":"^3.4.1","eslint-plugin-react":"^7.37.2","eslint-plugin-react-hooks":"^5.1.0","eslint-plugin-solid":"^0.14.5","eslint-plugin-vitest":"^0.5.4","globals":"^15.13.0","typescript-eslint":"^8.18.1"},"devDependencies":{"@eslint/config-inspector":"^0.6.0"}}
@@ -747,22 +747,6 @@ export default {
747
747
  prop: "ignore",
748
748
  },
749
749
  ],
750
- // override the default typescript rule to allow PascalCase function names for function components in React
751
- "@typescript-eslint/naming-convention": [
752
- "error",
753
- {
754
- selector: "variable",
755
- format: ["camelCase", "PascalCase", "UPPER_CASE"],
756
- },
757
- {
758
- selector: "function",
759
- format: ["camelCase", "PascalCase"],
760
- },
761
- {
762
- selector: "typeLike",
763
- format: ["PascalCase"],
764
- },
765
- ],
766
750
  "react-hooks/rules-of-hooks": "error",
767
751
  "react-hooks/exhaustive-deps": "warn",
768
752
  },