@dvukovic/style-guide 0.3.93 → 0.3.94

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.
Files changed (66) hide show
  1. package/README.md +112 -115
  2. package/package.json +54 -53
  3. package/src/cspell/base.txt +2 -0
  4. package/src/eslint/configs/core.js +35 -19
  5. package/src/eslint/configs/core.test.js +23 -0
  6. package/src/eslint/configs/jest.js +5 -4
  7. package/src/eslint/configs/jest.test.js +17 -0
  8. package/src/eslint/configs/mobx.js +5 -4
  9. package/src/eslint/configs/mobx.test.js +17 -0
  10. package/src/eslint/configs/next.js +5 -4
  11. package/src/eslint/configs/next.test.js +17 -0
  12. package/src/eslint/configs/node.js +6 -4
  13. package/src/eslint/configs/node.test.js +17 -0
  14. package/src/eslint/configs/playwright.js +5 -4
  15. package/src/eslint/configs/playwright.test.js +17 -0
  16. package/src/eslint/configs/react.js +6 -4
  17. package/src/eslint/configs/react.test.js +17 -0
  18. package/src/eslint/configs/storybook.js +15 -10
  19. package/src/eslint/configs/storybook.test.js +17 -0
  20. package/src/eslint/configs/typescript-strict.js +31 -24
  21. package/src/eslint/configs/typescript-strict.test.js +17 -0
  22. package/src/eslint/configs/typescript.js +6 -4
  23. package/src/eslint/configs/typescript.test.js +17 -0
  24. package/src/eslint/configs/vitest.js +5 -4
  25. package/src/eslint/configs/vitest.test.js +17 -0
  26. package/src/eslint/plugins/es-x.js +8 -15
  27. package/src/eslint/plugins/eslint-comments.js +10 -8
  28. package/src/eslint/plugins/eslint.js +13 -8
  29. package/src/eslint/plugins/etc.js +3 -13
  30. package/src/eslint/plugins/import-x.js +8 -4
  31. package/src/eslint/plugins/jest.js +9 -3
  32. package/src/eslint/plugins/mobx.js +8 -3
  33. package/src/eslint/plugins/n.js +8 -3
  34. package/src/eslint/plugins/next.js +8 -3
  35. package/src/eslint/plugins/playwright.js +9 -3
  36. package/src/eslint/plugins/prettier.js +12 -0
  37. package/src/eslint/plugins/promise.js +11 -15
  38. package/src/eslint/plugins/react-hooks.js +8 -3
  39. package/src/eslint/plugins/react.js +13 -4
  40. package/src/eslint/plugins/rimac.js +8 -3
  41. package/src/eslint/plugins/security-node.js +8 -3
  42. package/src/eslint/plugins/simple-import-sort.js +8 -3
  43. package/src/eslint/plugins/sonarjs.js +38 -32
  44. package/src/eslint/plugins/sort-destructure-keys.js +8 -3
  45. package/src/eslint/plugins/sort-keys-fix.js +8 -3
  46. package/src/eslint/plugins/storybook.js +8 -3
  47. package/src/eslint/plugins/stylistic.js +8 -3
  48. package/src/eslint/plugins/typescript-eslint.js +10 -6
  49. package/src/eslint/plugins/typescript-sort-keys.js +8 -3
  50. package/src/eslint/plugins/unicorn.js +20 -3
  51. package/src/eslint/plugins/unused-imports.js +8 -3
  52. package/src/eslint/plugins/vitest.js +30 -5
  53. package/src/package-json/configs/core.js +3 -5
  54. package/src/package-json/plugins/package-json.js +2 -4
  55. package/src/prettier/configs/core.js +6 -4
  56. package/src/prettier/configs/core.test.js +24 -0
  57. package/src/prettier/plugins/embed.js +2 -4
  58. package/src/prettier/plugins/prettier.js +2 -4
  59. package/src/prettier/plugins/sql.js +2 -4
  60. package/src/stylelint/configs/core.js +6 -4
  61. package/src/stylelint/configs/core.test.js +24 -0
  62. package/src/stylelint/plugins/no-unused-selectors.js +2 -4
  63. package/src/stylelint/plugins/order.js +2 -4
  64. package/src/stylelint/plugins/stylelint.js +9 -4
  65. package/src/graphql/configs/core.js +0 -4
  66. package/src/graphql/plugins/graphql.js +0 -96
@@ -1,4 +1,5 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- extends: ["../plugins/playwright.js"],
4
- }
1
+ import playwrightPlugin from "../plugins/playwright.js"
2
+
3
+ const playwrightConfig = [playwrightPlugin]
4
+
5
+ export default playwrightConfig
@@ -0,0 +1,17 @@
1
+ import { ESLint } from "eslint"
2
+
3
+ import config from "./playwright.js"
4
+
5
+ const eslint = new ESLint({
6
+ overrideConfig: config,
7
+ overrideConfigFile: true,
8
+ })
9
+
10
+ describe("playwright", () => {
11
+ test("loads without errors", async () => {
12
+ const results = await eslint.lintText("const x = 1\n", { filePath: "test.spec.ts" })
13
+
14
+ expect(results).toBeDefined()
15
+ expect(results[0].fatalErrorCount).toBe(0)
16
+ })
17
+ })
@@ -1,4 +1,6 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- extends: ["../plugins/react.js", "../plugins/react-hooks.js"],
4
- }
1
+ import reactPlugin from "../plugins/react.js"
2
+ import reactHooksPlugin from "../plugins/react-hooks.js"
3
+
4
+ const reactConfig = [reactPlugin, reactHooksPlugin]
5
+
6
+ export default reactConfig
@@ -0,0 +1,17 @@
1
+ import { ESLint } from "eslint"
2
+
3
+ import config from "./react.js"
4
+
5
+ const eslint = new ESLint({
6
+ overrideConfig: config,
7
+ overrideConfigFile: true,
8
+ })
9
+
10
+ describe("react", () => {
11
+ test("loads without errors", async () => {
12
+ const results = await eslint.lintText("const x = 1\n", { filePath: "test.tsx" })
13
+
14
+ expect(results).toBeDefined()
15
+ expect(results[0].fatalErrorCount).toBe(0)
16
+ })
17
+ })
@@ -1,11 +1,16 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- extends: ["../plugins/storybook"],
4
- rules: {
5
- "no-console": "off",
6
- "react-hooks/rules-of-hooks": "off",
7
- "react/no-array-index-key": "off",
8
- "security-node/detect-crlf": "off",
9
- "unicorn/consistent-function-scoping": "off",
1
+ import storybookPlugin from "../plugins/storybook.js"
2
+
3
+ const storybookConfig = [
4
+ storybookPlugin,
5
+ {
6
+ rules: {
7
+ "no-console": "off",
8
+ "react-hooks/rules-of-hooks": "off",
9
+ "react/no-array-index-key": "off",
10
+ "security-node/detect-crlf": "off",
11
+ "unicorn/consistent-function-scoping": "off",
12
+ },
10
13
  },
11
- }
14
+ ]
15
+
16
+ export default storybookConfig
@@ -0,0 +1,17 @@
1
+ import { ESLint } from "eslint"
2
+
3
+ import config from "./storybook.js"
4
+
5
+ const eslint = new ESLint({
6
+ overrideConfig: config,
7
+ overrideConfigFile: true,
8
+ })
9
+
10
+ describe("storybook", () => {
11
+ test("loads without errors", async () => {
12
+ const results = await eslint.lintText("const x = 1\n", { filePath: "test.stories.tsx" })
13
+
14
+ expect(results).toBeDefined()
15
+ expect(results[0].fatalErrorCount).toBe(0)
16
+ })
17
+ })
@@ -1,25 +1,32 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["@typescript-eslint"],
4
- rules: {
5
- "@typescript-eslint/no-unsafe-argument": "error",
6
- "@typescript-eslint/no-unsafe-assignment": "error",
7
- "@typescript-eslint/no-unsafe-call": "error",
8
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
9
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
10
- "@typescript-eslint/no-unsafe-member-access": "error",
11
- "@typescript-eslint/no-unsafe-return": "error",
12
- "@typescript-eslint/no-unsafe-unary-minus": "error",
13
- "@typescript-eslint/restrict-template-expressions": [
14
- "error",
15
- {
16
- allowAny: false,
17
- allowBoolean: false,
18
- allowNever: false,
19
- allowNullish: false,
20
- allowNumber: true,
21
- allowRegExp: false,
22
- },
23
- ],
1
+ import typescriptEslint from "typescript-eslint"
2
+
3
+ const typescriptStrictConfig = [
4
+ {
5
+ plugins: {
6
+ "@typescript-eslint": typescriptEslint.plugin,
7
+ },
8
+ rules: {
9
+ "@typescript-eslint/no-unsafe-argument": "error",
10
+ "@typescript-eslint/no-unsafe-assignment": "error",
11
+ "@typescript-eslint/no-unsafe-call": "error",
12
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
13
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
14
+ "@typescript-eslint/no-unsafe-member-access": "error",
15
+ "@typescript-eslint/no-unsafe-return": "error",
16
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
17
+ "@typescript-eslint/restrict-template-expressions": [
18
+ "error",
19
+ {
20
+ allowAny: false,
21
+ allowBoolean: false,
22
+ allowNever: false,
23
+ allowNullish: false,
24
+ allowNumber: true,
25
+ allowRegExp: false,
26
+ },
27
+ ],
28
+ },
24
29
  },
25
- }
30
+ ]
31
+
32
+ export default typescriptStrictConfig
@@ -0,0 +1,17 @@
1
+ import { ESLint } from "eslint"
2
+
3
+ import config from "./typescript-strict.js"
4
+
5
+ const eslint = new ESLint({
6
+ overrideConfig: config,
7
+ overrideConfigFile: true,
8
+ })
9
+
10
+ describe("typescript-strict", () => {
11
+ test("loads without errors", async () => {
12
+ const results = await eslint.lintText("const x: number = 1\n", { filePath: "test.ts" })
13
+
14
+ expect(results).toBeDefined()
15
+ expect(results[0].fatalErrorCount).toBe(0)
16
+ })
17
+ })
@@ -1,4 +1,6 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- extends: ["../plugins/typescript-eslint.js", "../plugins/typescript-sort-keys.js"],
4
- }
1
+ import typescriptEslintPlugin from "../plugins/typescript-eslint.js"
2
+ import typescriptSortKeysPlugin from "../plugins/typescript-sort-keys.js"
3
+
4
+ const typescriptConfig = [typescriptEslintPlugin, typescriptSortKeysPlugin]
5
+
6
+ export default typescriptConfig
@@ -0,0 +1,17 @@
1
+ import { ESLint } from "eslint"
2
+
3
+ import config from "./typescript.js"
4
+
5
+ const eslint = new ESLint({
6
+ overrideConfig: config,
7
+ overrideConfigFile: true,
8
+ })
9
+
10
+ describe("typescript", () => {
11
+ test("loads without errors", async () => {
12
+ const results = await eslint.lintText("const x: number = 1\n", { filePath: "test.ts" })
13
+
14
+ expect(results).toBeDefined()
15
+ expect(results[0].fatalErrorCount).toBe(0)
16
+ })
17
+ })
@@ -1,4 +1,5 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- extends: ["../plugins/vitest.js"],
4
- }
1
+ import vitestPlugin from "../plugins/vitest.js"
2
+
3
+ const vitestConfig = [vitestPlugin]
4
+
5
+ export default vitestConfig
@@ -0,0 +1,17 @@
1
+ import { ESLint } from "eslint"
2
+
3
+ import config from "./vitest.js"
4
+
5
+ const eslint = new ESLint({
6
+ overrideConfig: config,
7
+ overrideConfigFile: true,
8
+ })
9
+
10
+ describe("vitest", () => {
11
+ test("loads without errors", async () => {
12
+ const results = await eslint.lintText("const x = 1\n", { filePath: "test.test.ts" })
13
+
14
+ expect(results).toBeDefined()
15
+ expect(results[0].fatalErrorCount).toBe(0)
16
+ })
17
+ })
@@ -1,17 +1,10 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["es-x"],
4
- rules: {
5
- "es-x/no-iterator-prototype-drop": "error",
6
- "es-x/no-iterator-prototype-every": "error",
7
- "es-x/no-iterator-prototype-filter": "error",
8
- "es-x/no-iterator-prototype-find": "error",
9
- "es-x/no-iterator-prototype-flatmap": "error",
10
- "es-x/no-iterator-prototype-foreach": "error",
11
- "es-x/no-iterator-prototype-map": "error",
12
- "es-x/no-iterator-prototype-reduce": "error",
13
- "es-x/no-iterator-prototype-some": "error",
14
- "es-x/no-iterator-prototype-take": "error",
15
- "es-x/no-iterator-prototype-toarray": "error",
1
+ import esX from "eslint-plugin-es-x"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "es-x": esX,
16
6
  },
7
+ rules: {},
17
8
  }
9
+
10
+ export default plugin
@@ -1,16 +1,18 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["@eslint-community/eslint-comments"],
1
+ import eslintComments from "@eslint-community/eslint-plugin-eslint-comments"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "@eslint-community/eslint-comments": eslintComments,
6
+ },
4
7
  rules: {
5
- "@eslint-community/eslint-comments/disable-enable-pair": [
6
- "error",
7
- { allowWholeFile: true },
8
- ],
8
+ "@eslint-community/eslint-comments/disable-enable-pair": "error",
9
9
  "@eslint-community/eslint-comments/no-aggregating-enable": "error",
10
10
  "@eslint-community/eslint-comments/no-duplicate-disable": "error",
11
11
  "@eslint-community/eslint-comments/no-unlimited-disable": "error",
12
12
  "@eslint-community/eslint-comments/no-unused-disable": "error",
13
13
  "@eslint-community/eslint-comments/no-unused-enable": "error",
14
- "@eslint-community/eslint-comments/require-description": ["error", { ignore: [] }],
14
+ "@eslint-community/eslint-comments/require-description": "error",
15
15
  },
16
16
  }
17
+
18
+ export default plugin
@@ -1,8 +1,13 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- env: {
4
- es6: true,
5
- node: true,
1
+ import globals from "globals"
2
+
3
+ const plugin = {
4
+ languageOptions: {
5
+ ecmaVersion: 2024,
6
+ globals: {
7
+ ...globals.es2024,
8
+ ...globals.node,
9
+ },
10
+ sourceType: "module",
6
11
  },
7
12
  rules: {
8
13
  "array-callback-return": [
@@ -80,7 +85,6 @@ module.exports = {
80
85
  "no-lone-blocks": "error",
81
86
  "no-lonely-if": "error",
82
87
  "no-loop-func": "error",
83
- "no-loss-of-precision": "error",
84
88
  "no-misleading-character-class": "error",
85
89
  "no-multi-assign": "error",
86
90
  "no-multi-str": "error",
@@ -115,10 +119,9 @@ module.exports = {
115
119
  "no-unsafe-optional-chaining": "error",
116
120
  "no-unused-expressions": "error",
117
121
  "no-unused-labels": "error",
118
- "no-unused-private-class-members": "error",
119
122
  "no-unused-vars": "error",
120
123
  "no-use-before-define": "error",
121
- // "no-useless-assignment": "error", NOTE: available in eslint 9
124
+ "no-useless-assignment": "error",
122
125
  "no-useless-backreference": "error",
123
126
  "no-useless-call": "error",
124
127
  "no-useless-catch": "error",
@@ -163,3 +166,5 @@ module.exports = {
163
166
  yoda: "error",
164
167
  },
165
168
  }
169
+
170
+ export default plugin
@@ -1,13 +1,3 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["etc"],
4
- rules: {
5
- "etc/no-assign-mutated-array": "error",
6
- "etc/no-commented-out-code": "error",
7
- "etc/no-deprecated": "error",
8
- "etc/no-enum": "error",
9
- "etc/no-internal": "error",
10
- "etc/no-t": "error",
11
- "etc/throw-error": "error",
12
- },
13
- }
1
+ const plugin = {}
2
+
3
+ export default plugin
@@ -1,6 +1,9 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["import-x"],
1
+ import importXPlugin from "eslint-plugin-import-x"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "import-x": importXPlugin,
6
+ },
4
7
  rules: {
5
8
  "import-x/default": "error",
6
9
  "import-x/export": "error",
@@ -10,7 +13,6 @@ module.exports = {
10
13
  "import-x/namespace": "error",
11
14
  "import-x/newline-after-import": "error",
12
15
  "import-x/no-absolute-path": "error",
13
- "import-x/no-anonymous-default-export": "error",
14
16
  "import-x/no-cycle": "error",
15
17
  "import-x/no-deprecated": "error",
16
18
  "import-x/no-duplicates": "error",
@@ -26,3 +28,5 @@ module.exports = {
26
28
  "import-x/no-useless-path-segments": "error",
27
29
  },
28
30
  }
31
+
32
+ export default plugin
@@ -1,6 +1,9 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["jest"],
1
+ import jest from "eslint-plugin-jest"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ jest,
6
+ },
4
7
  rules: {
5
8
  "jest/consistent-test-it": ["error", { fn: "test", withinDescribe: "test" }],
6
9
  "jest/expect-expect": "error",
@@ -53,6 +56,9 @@ module.exports = {
53
56
  "jest/valid-describe-callback": "error",
54
57
  "jest/valid-expect": "error",
55
58
  "jest/valid-expect-in-promise": "error",
59
+ "jest/valid-mock-module-path": "error",
56
60
  "jest/valid-title": "error",
57
61
  },
58
62
  }
63
+
64
+ export default plugin
@@ -1,9 +1,14 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["mobx"],
1
+ import mobx from "eslint-plugin-mobx"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ mobx,
6
+ },
4
7
  rules: {
5
8
  "mobx/exhaustive-make-observable": "error",
6
9
  "mobx/missing-make-observable": "error",
7
10
  "mobx/unconditional-make-observable": "error",
8
11
  },
9
12
  }
13
+
14
+ export default plugin
@@ -1,6 +1,9 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["n"],
1
+ import pluginNode from "eslint-plugin-n"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ n: pluginNode,
6
+ },
4
7
  rules: {
5
8
  "n/callback-return": "error",
6
9
  "n/exports-style": "error",
@@ -35,3 +38,5 @@ module.exports = {
35
38
  "n/prefer-promises/fs": "error",
36
39
  },
37
40
  }
41
+
42
+ export default plugin
@@ -1,6 +1,9 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["@next/eslint-plugin-next"],
1
+ import next from "@next/eslint-plugin-next"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "@next/next": next,
6
+ },
4
7
  rules: {
5
8
  "@next/next/google-font-display": "error",
6
9
  "@next/next/google-font-preconnect": "error",
@@ -25,3 +28,5 @@ module.exports = {
25
28
  "@next/next/no-unwanted-polyfillio": "error",
26
29
  },
27
30
  }
31
+
32
+ export default plugin
@@ -1,6 +1,9 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["playwright"],
1
+ import playwright from "eslint-plugin-playwright"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ playwright,
6
+ },
4
7
  rules: {
5
8
  "playwright/expect-expect": "error",
6
9
  "playwright/max-expects": ["error", { max: 15 }],
@@ -21,6 +24,7 @@ module.exports = {
21
24
  "playwright/no-slowed-test": "error",
22
25
  "playwright/no-standalone-expect": "error",
23
26
  "playwright/no-unsafe-references": "error",
27
+ "playwright/no-unused-locators": "error",
24
28
  "playwright/no-useless-await": "error",
25
29
  "playwright/no-useless-not": "error",
26
30
  "playwright/no-wait-for-selector": "error",
@@ -52,3 +56,5 @@ module.exports = {
52
56
  "playwright/valid-title": "error",
53
57
  },
54
58
  }
59
+
60
+ export default plugin
@@ -0,0 +1,12 @@
1
+ import eslintPluginPrettier from "eslint-plugin-prettier"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ prettier: eslintPluginPrettier,
6
+ },
7
+ rules: {
8
+ "prettier/prettier": "error",
9
+ },
10
+ }
11
+
12
+ export default plugin
@@ -1,26 +1,22 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["promise"],
1
+ import promise from "eslint-plugin-promise"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ promise,
6
+ },
4
7
  rules: {
5
- "promise/always-return": [
6
- "error",
7
- {
8
- ignoreLastCallback: true,
9
- },
10
- ],
11
- "promise/catch-or-return": [
12
- "error",
13
- {
14
- allowFinally: true,
15
- },
16
- ],
8
+ "promise/always-return": "error",
9
+ "promise/catch-or-return": "error",
17
10
  "promise/no-callback-in-promise": "error",
18
11
  "promise/no-multiple-resolved": "error",
19
12
  "promise/no-nesting": "error",
20
13
  "promise/no-new-statics": "error",
14
+ "promise/no-promise-in-callback": "error",
21
15
  "promise/no-return-in-finally": "error",
22
16
  "promise/no-return-wrap": "error",
23
17
  "promise/param-names": "error",
24
18
  "promise/valid-params": "error",
25
19
  },
26
20
  }
21
+
22
+ export default plugin
@@ -1,7 +1,12 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["react-hooks"],
1
+ import reactHooks from "eslint-plugin-react-hooks"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "react-hooks": reactHooks,
6
+ },
4
7
  rules: {
5
8
  "react-hooks/rules-of-hooks": "error",
6
9
  },
7
10
  }
11
+
12
+ export default plugin
@@ -1,6 +1,9 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["react"],
1
+ import react from "eslint-plugin-react"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ react,
6
+ },
4
7
  rules: {
5
8
  "react/boolean-prop-naming": "error",
6
9
  "react/button-has-type": "error",
@@ -28,7 +31,6 @@ module.exports = {
28
31
  props: "never",
29
32
  },
30
33
  ],
31
- "react/jsx-filename-extension": "error",
32
34
  "react/jsx-filename-extension": [
33
35
  "error",
34
36
  { allow: "as-needed", extensions: [".tsx", ".jsx"] },
@@ -98,4 +100,11 @@ module.exports = {
98
100
  "react/style-prop-object": "error",
99
101
  "react/void-dom-elements-no-children": "error",
100
102
  },
103
+ settings: {
104
+ react: {
105
+ version: "detect",
106
+ },
107
+ },
101
108
  }
109
+
110
+ export default plugin
@@ -1,8 +1,13 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["@rimac-technology"],
1
+ import rimac from "@rimac-technology/eslint-plugin"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "@rimac-technology": rimac,
6
+ },
4
7
  rules: {
5
8
  "@rimac-technology/class-element-sorting": "error",
6
9
  "@rimac-technology/document-todos": ["error", { url: "http" }],
7
10
  },
8
11
  }
12
+
13
+ export default plugin
@@ -1,6 +1,9 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["security-node"],
1
+ import securityNode from "eslint-plugin-security-node"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "security-node": securityNode,
6
+ },
4
7
  rules: {
5
8
  "security-node/detect-absence-of-name-option-in-exrpress-session": "error",
6
9
  "security-node/detect-buffer-unsafe-allocation": "error",
@@ -26,3 +29,5 @@ module.exports = {
26
29
  "security-node/non-literal-reg-expr": "error",
27
30
  },
28
31
  }
32
+
33
+ export default plugin
@@ -1,8 +1,13 @@
1
- /** @type {import("eslint").ESLint.ConfigData} */
2
- module.exports = {
3
- plugins: ["simple-import-sort"],
1
+ import simpleImportSort from "eslint-plugin-simple-import-sort"
2
+
3
+ const plugin = {
4
+ plugins: {
5
+ "simple-import-sort": simpleImportSort,
6
+ },
4
7
  rules: {
5
8
  "simple-import-sort/exports": "error",
6
9
  "simple-import-sort/imports": "error",
7
10
  },
8
11
  }
12
+
13
+ export default plugin