@oncehub/eslint-config 3.1.1 → 4.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/LICENSE +1 -1
- package/README.md +1 -1
- package/index.js +8 -30
- package/package.json +6 -9
package/LICENSE
CHANGED
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.
|
|
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,33 @@
|
|
|
1
1
|
import eslint from "@eslint/js";
|
|
2
|
-
import
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
35
|
-
|
|
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/
|
|
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
|
-
"
|
|
23
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
24
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
44
25
|
},
|
|
45
26
|
},
|
|
46
|
-
// overriding rules specifically for test files
|
|
47
27
|
{
|
|
48
28
|
files: ["**/*(specs|tests)/**", "**/*.spec.ts"],
|
|
49
29
|
rules: {
|
|
50
30
|
"@typescript-eslint/no-empty-function": "off",
|
|
51
|
-
"sonarjs/no-identical-functions": "off",
|
|
52
|
-
"sonarjs/no-duplicate-string": "off",
|
|
53
31
|
},
|
|
54
32
|
}
|
|
55
33
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oncehub/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.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.
|
|
17
|
-
"
|
|
18
|
-
"eslint-
|
|
19
|
-
"eslint-plugin-
|
|
20
|
-
"eslint
|
|
21
|
-
"eslint-plugin-sonarjs": "3.0.1",
|
|
22
|
-
"globals": "15.13.0",
|
|
23
|
-
"typescript-eslint": "8.18.0"
|
|
16
|
+
"@eslint/js": "^9.25.1",
|
|
17
|
+
"@types/eslint__js": "^9.14.0",
|
|
18
|
+
"eslint-config-prettier": "^10.1.2",
|
|
19
|
+
"eslint-plugin-sonarjs": "^3.0.2",
|
|
20
|
+
"typescript-eslint": "^8.31.1"
|
|
24
21
|
},
|
|
25
22
|
"peerDependencies": {
|
|
26
23
|
"eslint": ">= 9"
|