@commencis/eslint-config 3.0.1 → 3.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @commencis/eslint-config
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - - feat: initialize project service for ts-eslint ([#431](https://github.com/Commencis/js-toolkit/pull/431))
8
+ - feat: add base complexity rules
9
+ - feat: add jest and vitest globals
10
+
11
+ ## 3.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - chore: update core dependencies ([#427](https://github.com/Commencis/js-toolkit/pull/427))
16
+
3
17
  ## 3.0.1
4
18
 
5
19
  ### Patch Changes
@@ -1,7 +1,6 @@
1
1
  import { Linter } from "eslint";
2
2
 
3
3
  //#region src/types/config.types.d.ts
4
-
5
4
  /**
6
5
  * Relax plugins type limitation,
7
6
  * as most of the plugins did not have correct type info yet.
@@ -15,7 +15,9 @@ const baseRuleset = {
15
15
  ...globals.browser,
16
16
  ...globals.es2021,
17
17
  ...globals.node,
18
- ...globals.serviceworker
18
+ ...globals.serviceworker,
19
+ ...globals.jest,
20
+ ...globals.vitest
19
21
  },
20
22
  parserOptions: {
21
23
  ecmaFeatures: { jsx: true },
@@ -232,7 +234,13 @@ const javascriptRuleset = {
232
234
  "no-with": "error",
233
235
  "require-yield": "error",
234
236
  "use-isnan": "error",
235
- "valid-typeof": "error"
237
+ "valid-typeof": "error",
238
+ complexity: ["error", { max: 20 }],
239
+ "max-statements": ["error", 30],
240
+ "max-nested-callbacks": ["error", 3],
241
+ "max-lines": ["error", 500],
242
+ "max-params": ["error", 4],
243
+ "max-depth": ["error", 3]
236
244
  },
237
245
  name: "@commencis/javascript"
238
246
  };
@@ -488,7 +496,10 @@ const typescriptRuleset = {
488
496
  plugins: { "@typescript-eslint": plugin },
489
497
  languageOptions: {
490
498
  parser,
491
- sourceType: "module"
499
+ parserOptions: {
500
+ sourceType: "module",
501
+ projectService: true
502
+ }
492
503
  },
493
504
  rules: {
494
505
  "@typescript-eslint/ban-ts-comment": ["error", { minimumDescriptionLength: 10 }],
@@ -1,4 +1,4 @@
1
- import { t as FlatConfig } from "../config.types-M1gOzpFJ.mjs";
1
+ import { t as FlatConfig } from "../config.types-lPpPZZFj.mjs";
2
2
  import * as eslint_config0 from "eslint/config";
3
3
 
4
4
  //#region src/configs/javascript.d.ts
@@ -1,4 +1,4 @@
1
- import { t as configFactory } from "../configFactory-D_qKOxEp.mjs";
1
+ import { t as configFactory } from "../configFactory-CXHEg3eE.mjs";
2
2
  import { defineConfig } from "eslint/config";
3
3
 
4
4
  //#region src/configs/javascript.ts
@@ -1,4 +1,4 @@
1
- import { t as FlatConfig } from "../config.types-M1gOzpFJ.mjs";
1
+ import { t as FlatConfig } from "../config.types-lPpPZZFj.mjs";
2
2
  import * as eslint_config0 from "eslint/config";
3
3
 
4
4
  //#region src/configs/native.d.ts
@@ -1,4 +1,4 @@
1
- import { t as configFactory } from "../configFactory-D_qKOxEp.mjs";
1
+ import { t as configFactory } from "../configFactory-CXHEg3eE.mjs";
2
2
  import { defineConfig } from "eslint/config";
3
3
 
4
4
  //#region src/configs/native.ts
@@ -1,4 +1,4 @@
1
- import { t as FlatConfig } from "../config.types-M1gOzpFJ.mjs";
1
+ import { t as FlatConfig } from "../config.types-lPpPZZFj.mjs";
2
2
  import * as eslint_config1 from "eslint/config";
3
3
 
4
4
  //#region src/configs/next.d.ts
@@ -1,4 +1,4 @@
1
- import { t as configFactory } from "../configFactory-D_qKOxEp.mjs";
1
+ import { t as configFactory } from "../configFactory-CXHEg3eE.mjs";
2
2
  import { defineConfig } from "eslint/config";
3
3
 
4
4
  //#region src/configs/next.ts
@@ -1,4 +1,4 @@
1
- import { t as FlatConfig } from "../config.types-M1gOzpFJ.mjs";
1
+ import { t as FlatConfig } from "../config.types-lPpPZZFj.mjs";
2
2
  import * as eslint_config2 from "eslint/config";
3
3
 
4
4
  //#region src/configs/react.d.ts
@@ -1,4 +1,4 @@
1
- import { t as configFactory } from "../configFactory-D_qKOxEp.mjs";
1
+ import { t as configFactory } from "../configFactory-CXHEg3eE.mjs";
2
2
  import { defineConfig } from "eslint/config";
3
3
 
4
4
  //#region src/configs/react.ts
@@ -1,4 +1,4 @@
1
- import { t as FlatConfig } from "../config.types-M1gOzpFJ.mjs";
1
+ import { t as FlatConfig } from "../config.types-lPpPZZFj.mjs";
2
2
  import * as eslint_config3 from "eslint/config";
3
3
 
4
4
  //#region src/configs/typescript.d.ts
@@ -1,4 +1,4 @@
1
- import { t as configFactory } from "../configFactory-D_qKOxEp.mjs";
1
+ import { t as configFactory } from "../configFactory-CXHEg3eE.mjs";
2
2
  import { defineConfig } from "eslint/config";
3
3
 
4
4
  //#region src/configs/typescript.ts
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as FlatConfig } from "./config.types-M1gOzpFJ.mjs";
1
+ import { t as FlatConfig } from "./config.types-lPpPZZFj.mjs";
2
2
  import { javascriptConfig } from "./configs/javascript.mjs";
3
3
  import { nextConfig } from "./configs/next.mjs";
4
4
  import { reactConfig } from "./configs/react.mjs";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as configFactory } from "./configFactory-D_qKOxEp.mjs";
1
+ import { t as configFactory } from "./configFactory-CXHEg3eE.mjs";
2
2
  import { javascriptConfig } from "./configs/javascript.mjs";
3
3
  import { nextConfig } from "./configs/next.mjs";
4
4
  import { reactConfig } from "./configs/react.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commencis/eslint-config",
3
- "version": "3.0.1",
3
+ "version": "3.2.0",
4
4
  "description": "Commencis ESLint config",
5
5
  "author": "Commencis WEB Team",
6
6
  "license": "Apache-2.0",