@oncehub/eslint-config 3.1.1 → 4.1.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Oncehub LTD
3
+ Copyright (c) 2025 Oncehub LTD
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -49,7 +49,7 @@ To generate a new rules snapshot file:
49
49
  $ npx eslint --print-config index.js -c index.js > output.json
50
50
  ```
51
51
 
52
- Copy the rules from the output file into `test/rules-snapshot.js`
52
+ Copy the rules from the output file into `test/rules-snapshot.json`
53
53
 
54
54
  ### Deployment
55
55
 
package/index.js CHANGED
@@ -1,55 +1,34 @@
1
1
  import eslint from "@eslint/js";
2
- import react from "eslint-plugin-react";
3
- import jsxA11y from "eslint-plugin-jsx-a11y";
4
- import importPlugin from "eslint-plugin-import";
2
+ import eslintConfigPrettier from "eslint-config-prettier/flat";
5
3
  import tseslint from "typescript-eslint";
6
4
  import sonarjs from "eslint-plugin-sonarjs";
7
- import prettierConfig from "eslint-config-prettier";
8
- import globals from "globals";
9
5
 
10
6
  export default tseslint.config(
11
7
  eslint.configs.recommended,
12
- ...tseslint.configs.recommended,
13
- importPlugin.flatConfigs.recommended,
14
- react.configs.flat.recommended,
15
- react.configs.flat["jsx-runtime"],
16
- jsxA11y.flatConfigs.recommended,
8
+ tseslint.configs.recommended,
17
9
  sonarjs.configs.recommended,
18
- prettierConfig,
10
+ eslintConfigPrettier,
19
11
  {
20
12
  files: ["**/*.{js,ts,jsx,tsx}"],
21
- languageOptions: {
22
- globals: {
23
- ...globals.browser,
24
- ...globals.node,
25
- Atomics: "readonly",
26
- SharedArrayBuffer: "readonly",
27
- },
28
- parserOptions: {
29
- ecmaVersion: 2018,
30
- sourceType: "module",
31
- },
32
- },
33
13
  rules: {
34
- // base rule needs to be disabled to prevent errors with the ts version
35
- // see https://typescript-eslint.io/rules/#extension-rules
14
+ "@typescript-eslint/no-use-before-define": "off",
15
+ "@typescript-eslint/no-inferrable-types": "off",
36
16
  "no-unused-vars": "off",
37
17
  "@typescript-eslint/no-unused-vars": "error",
38
- "@typescript-eslint/no-explicit-any": "off",
18
+ "@typescript-eslint/interface-name-prefix": "off",
39
19
  "@typescript-eslint/consistent-type-assertions": [
40
20
  "error",
41
21
  { assertionStyle: "angle-bracket" },
42
22
  ],
43
- "import/no-unresolved": "off",
23
+ "@typescript-eslint/no-explicit-any": "off",
24
+ "@typescript-eslint/explicit-function-return-type": "off",
25
+ "sonarjs/todo-tag": "warn",
44
26
  },
45
27
  },
46
- // overriding rules specifically for test files
47
28
  {
48
29
  files: ["**/*(specs|tests)/**", "**/*.spec.ts"],
49
30
  rules: {
50
31
  "@typescript-eslint/no-empty-function": "off",
51
- "sonarjs/no-identical-functions": "off",
52
- "sonarjs/no-duplicate-string": "off",
53
32
  },
54
33
  }
55
34
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oncehub/eslint-config",
3
- "version": "3.1.1",
3
+ "version": "4.1.0",
4
4
  "description": "ESLint configuration for micro-services built using Node.js and TypeScript",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,14 +13,11 @@
13
13
  "author": "Rajat Saxena <rajat.saxena@oncehub.com>",
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@eslint/js": "9.16.0",
17
- "eslint-config-prettier": "9.1.0",
18
- "eslint-plugin-import": "2.31.0",
19
- "eslint-plugin-jsx-a11y": "6.10.2",
20
- "eslint-plugin-react": "7.37.2",
21
- "eslint-plugin-sonarjs": "3.0.1",
22
- "globals": "15.13.0",
23
- "typescript-eslint": "8.18.0"
16
+ "@eslint/js": "^9.30.0",
17
+ "@types/eslint__js": "^9.14.0",
18
+ "eslint-config-prettier": "^10.1.5",
19
+ "eslint-plugin-sonarjs": "^3.0.4",
20
+ "typescript-eslint": "^8.35.1"
24
21
  },
25
22
  "peerDependencies": {
26
23
  "eslint": ">= 9"