@prowise/eslint-config-linting-rules 2.4.6 → 3.0.0

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/README.md CHANGED
@@ -42,9 +42,9 @@ export default [
42
42
 
43
43
  ```
44
44
 
45
- Sample of a `eslint.config.js` file for a frontend project using react and typescript:
45
+ Sample of a `eslint.config.js` file for a react frontend project using react and typescript:
46
46
  ```
47
- import backend from "@prowise/eslint-config-linting-rules/frontend";
47
+ import frontend from "@prowise/eslint-config-linting-rules/front-react";
48
48
 
49
49
  export default [
50
50
  { ignores: [ "**/reports", "**/dist/"] },
@@ -75,7 +75,7 @@ You need to remove all `.eslintrc` and `.eslintignore` files from all sub folder
75
75
 
76
76
  If you want different configuration for the different folders yo can use the following config as example:
77
77
  ```
78
- import frontend from "@prowise/eslint-config-linting-rules/frontend";
78
+ import frontend from "@prowise/eslint-config-linting-rules/front-react";
79
79
 
80
80
  export default [
81
81
  // IGNORES MUST BE ON TOP !
package/base.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * Basic rules for all javascript projects
3
3
  */
4
- import progress from "eslint-plugin-file-progress";
5
4
  import base from "./rules/baseSettings.js";
5
+ import progress from "./rules/file-progress.js";
6
6
  import imports from "./rules/plugin-import-rules.js";
7
7
  import jsDoc from "./rules/plugin-jsdoc-rules.js";
8
8
  import preferArrow from "./rules/plugin-prefer-arrow-rules.js";
package/eslint.config.js CHANGED
@@ -1,9 +1,27 @@
1
1
  import base from "./base.js";
2
+ import jsx from "./rules/jsx-pascal-case-rule.js";
3
+ import jsxA11y from "./rules/plugin-jsx-a11y-rules.js";
4
+ import next from "./rules/plugin-next-rules.js";
2
5
  import node from "./rules/plugin-node-rules.js";
6
+ import react from "./rules/plugin-react-rules.js";
7
+ import typescript from "./rules/plugin-typescript-rules.js";
8
+ import vitest from "./rules/plugin-vitest-rules.js";
3
9
 
4
- export default [base, node, {
5
- rules: {
6
- "import/no-named-as-default-member": "off",
7
- "import/no-named-as-default": "off",
8
- },
9
- }];
10
+ // this is only for testing all rules are configured correctly.
11
+ // DO NOT USE this in any repository as some of the rules will give conflicting results
12
+ export default [
13
+ base,
14
+ node,
15
+ typescript,
16
+ vitest,
17
+ react,
18
+ next,
19
+ jsxA11y,
20
+ {
21
+ plugins: { jsx },
22
+ rules: {
23
+ "import/no-named-as-default-member": "off",
24
+ "import/no-named-as-default": "off",
25
+ "jsx/jsx-element-pascal-case": "error",
26
+ },
27
+ }];
package/front-react.js CHANGED
@@ -11,7 +11,7 @@ export default [
11
11
  react,
12
12
  vitest,
13
13
  {
14
- plugins: { "@typescript-eslint": typescript.plugins["@typescript-eslint"], jsx },
14
+ plugins: { typescript: typescript.plugins.typescript, jsx },
15
15
  settings: { react: { version: "detect" } },
16
16
  languageOptions: {
17
17
  globals: {
@@ -22,7 +22,7 @@ export default [
22
22
  },
23
23
  rules: {
24
24
  "style/quote-props": ["error", "as-needed", { keywords: false, unnecessary: true, numbers: false }],
25
- "@typescript-eslint/naming-convention": [
25
+ "typescript/naming-convention": [
26
26
  "error",
27
27
  { selector: "variable", format: ["camelCase", "PascalCase", "UPPER_CASE"] },
28
28
  { selector: "typeLike", format: ["PascalCase"] },
package/front-solid.js CHANGED
@@ -1,13 +1,11 @@
1
1
  import globals from "globals";
2
2
  import base from "./base.js";
3
- import solid from "./rules/plugin-solid-rules.js";
4
3
  import typescript from "./rules/plugin-typescript-rules.js";
5
4
  import vitest from "./rules/plugin-vitest-rules.js";
6
5
 
7
6
  export default [
8
7
  base,
9
8
  typescript,
10
- solid,
11
9
  vitest,
12
10
  {
13
11
  languageOptions: {
package/next.js CHANGED
@@ -13,7 +13,7 @@ export default [
13
13
  next,
14
14
  vitest,
15
15
  {
16
- plugins: { "@typescript-eslint": typescript.plugins["@typescript-eslint"], jsx },
16
+ plugins: { typescript: typescript.plugins.typescript, jsx },
17
17
  settings: { react: { version: "detect" } },
18
18
  languageOptions: {
19
19
  globals: {
@@ -25,7 +25,7 @@ export default [
25
25
  },
26
26
  rules: {
27
27
  "style/quote-props": ["error", "as-needed", { keywords: false, unnecessary: true, numbers: false }],
28
- "@typescript-eslint/naming-convention": [
28
+ "typescript/naming-convention": [
29
29
  "error",
30
30
  { selector: "variable", format: ["camelCase", "PascalCase", "UPPER_CASE"] },
31
31
  { selector: "typeLike", format: ["PascalCase"] },
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@prowise/eslint-config-linting-rules","version":"2.4.6","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","test":"node tests/jsx-pascal-case-rule.test.js","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":"^16.2.1","@stylistic/eslint-plugin":"^5.10.0","@vitest/eslint-plugin":"^1.6.13","confusing-browser-globals":"^1.0.11","eslint":"^9.39.4","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-file-progress":"^3.0.2","eslint-plugin-import-x":"^4.16.2","eslint-plugin-jsdoc":"^62.8.1","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.24.0","eslint-plugin-prefer-arrow-functions":"^3.9.1","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^7.0.1","eslint-plugin-solid":"^0.14.5","globals":"^17.4.0","typescript-eslint":"^8.58.0"},"devDependencies":{"@eslint/config-inspector":"^1.5.0"}}
1
+ {"name":"@prowise/eslint-config-linting-rules","version":"3.0.0","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","test":"node tests/*.test.js","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":{"@eslint-react/eslint-plugin":"^5.10.0","@htmlacademy/eslint-plugin-jsx-a11y":"^6.11.0","@next/eslint-plugin-next":"^16.2.10","@stylistic/eslint-plugin":"^5.10.0","@vitest/eslint-plugin":"^1.6.20","confusing-browser-globals":"^1.0.11","eslint":"^10.6.0","eslint-import-resolver-typescript":"^4.4.5","eslint-plugin-import-x":"^4.17.1","eslint-plugin-jsdoc":"^63.0.10","eslint-plugin-n":"^18.2.1","eslint-plugin-prefer-arrow-functions":"^3.9.1","globals":"^17.7.0","nanospinner":"^1.2.2","typescript-eslint":"^8.62.1"},"devDependencies":{"@eslint/config-inspector":"^3.0.4"}}