@marlas/config 0.1.0 → 0.2.2
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 +2 -2
- package/package.json +2 -5
- package/src/oxlint.json +34 -2
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marlas/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Various tools default configs to extend in projects",
|
|
5
5
|
"author": "Marcin Lasak",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,10 +26,7 @@
|
|
|
26
26
|
"oxlint",
|
|
27
27
|
"linter"
|
|
28
28
|
],
|
|
29
|
-
"repository":
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "git+https://github.com/marlas/configs.git"
|
|
32
|
-
},
|
|
29
|
+
"repository": "github:marlass/configs",
|
|
33
30
|
"publishConfig": {
|
|
34
31
|
"access": "public"
|
|
35
32
|
},
|
package/src/oxlint.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"pedantic": "error",
|
|
7
7
|
"perf": "error",
|
|
8
8
|
"restriction": "error",
|
|
9
|
-
"style": "
|
|
9
|
+
"style": "error",
|
|
10
10
|
"nursery": "error"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
@@ -31,8 +31,28 @@
|
|
|
31
31
|
"eslint/max-lines": "off",
|
|
32
32
|
"eslint/max-statements": "off",
|
|
33
33
|
"eslint/max-params": "off",
|
|
34
|
+
// Sorting keys is bad idea. Very often you want to group by purpose
|
|
35
|
+
"eslint/sort-keys": "off",
|
|
36
|
+
// Sorting imports is formatter responsibility, not the linter.
|
|
37
|
+
"eslint/sort-imports": "off",
|
|
38
|
+
// This doesn't really matter. Sometimes you want to use arrow function, sometimes you want to use function declaration.
|
|
39
|
+
"eslint/func-style": "off",
|
|
40
|
+
// Sometimes single character variables are pretty useful
|
|
41
|
+
"eslint/id-length": "off",
|
|
42
|
+
// Ternary are fine
|
|
43
|
+
"eslint/no-ternary": "off",
|
|
44
|
+
// Too restrictive. There are number of patterns where this is useful
|
|
45
|
+
"eslint/init-declarations": "off",
|
|
46
|
+
// Object.assign is more memory efficient than spread operator
|
|
47
|
+
"eslint/prefer-object-spread": "off",
|
|
48
|
+
// 0 is often use to check presence of something and -1/1 are often used in sorting
|
|
49
|
+
"eslint/no-magic-numbers": ["error", { "ignore": [0, 1, -1] }],
|
|
34
50
|
// undefined has it's uses
|
|
35
51
|
"eslint/no-undefined": "off",
|
|
52
|
+
// Usefull for modifications later on without need to wrap in parentheses
|
|
53
|
+
"eslint/arrow-body-style": ["error", "always"],
|
|
54
|
+
// Duplicates are fine for type imports
|
|
55
|
+
"eslint/no-duplicate-imports": ["error", { "allowSeparateTypeImports": true }],
|
|
36
56
|
// async/await is supported almost everywhere now
|
|
37
57
|
"oxc/no-async-await": "off",
|
|
38
58
|
// React import are handled by the build tools for ergonomics
|
|
@@ -49,6 +69,18 @@
|
|
|
49
69
|
// Enforce .tsx extension for React files
|
|
50
70
|
"react/jsx-filename-extension": ["error", {
|
|
51
71
|
"extensions": [".tsx"]
|
|
52
|
-
}]
|
|
72
|
+
}],
|
|
73
|
+
// Bad idea for complexity metric
|
|
74
|
+
"react/jsx-max-depth": "off",
|
|
75
|
+
// Doesn't matter where the export is
|
|
76
|
+
"import/exports-last": "off",
|
|
77
|
+
// Grouping exports only require extra effort
|
|
78
|
+
"import/group-exports": "off",
|
|
79
|
+
// Named exports are the most ergonomic and should be used as default
|
|
80
|
+
"import/no-named-export": "off",
|
|
81
|
+
// Numbers are easier to spot than strings
|
|
82
|
+
"vitest/prefer-called-once": "off",
|
|
83
|
+
// These are often usefull for eg. starting server in tests
|
|
84
|
+
"jest/no-hooks": "off"
|
|
53
85
|
}
|
|
54
86
|
}
|