@mikrojs/eslint-plugin 0.0.7 → 0.0.8
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/dist/index.js +20 -53
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import tseslint from 'typescript-eslint';
|
|
2
1
|
import { noDotCatch } from './rules/no-dot-catch.js';
|
|
3
2
|
import { noEval } from './rules/no-eval.js';
|
|
4
3
|
import { noIntl } from './rules/no-intl.js';
|
|
@@ -26,61 +25,29 @@ const plugin = {
|
|
|
26
25
|
},
|
|
27
26
|
configs: {},
|
|
28
27
|
};
|
|
29
|
-
// Self-referencing: configs reference the plugin object
|
|
28
|
+
// Self-referencing: configs reference the plugin object.
|
|
29
|
+
// Type-aware rules require a parser (typescript-eslint) configured by the
|
|
30
|
+
// consumer; this config only registers @mikrojs/* rules.
|
|
30
31
|
Object.assign(plugin.configs, {
|
|
31
|
-
recommended:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'error',
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
{
|
|
48
|
-
prefer: 'type-imports',
|
|
49
|
-
fixStyle: 'inline-type-imports',
|
|
50
|
-
disallowTypeAnnotations: false,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
'@typescript-eslint/no-import-type-side-effects': 'error',
|
|
54
|
-
// Relax overly strict rules
|
|
55
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
56
|
-
'@typescript-eslint/no-require-imports': 'off',
|
|
57
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
58
|
-
'@typescript-eslint/no-empty-object-type': 'off',
|
|
59
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
60
|
-
},
|
|
61
|
-
}, {
|
|
62
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
63
|
-
languageOptions: {
|
|
64
|
-
parserOptions: {
|
|
65
|
-
projectService: true,
|
|
32
|
+
recommended: [
|
|
33
|
+
{
|
|
34
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
35
|
+
plugins: {
|
|
36
|
+
'@mikrojs': plugin,
|
|
37
|
+
},
|
|
38
|
+
rules: {
|
|
39
|
+
'@mikrojs/no-unhandled-result': 'error',
|
|
40
|
+
'@mikrojs/no-throw': 'error',
|
|
41
|
+
'@mikrojs/no-try-catch': 'error',
|
|
42
|
+
'@mikrojs/no-promise-reject': 'error',
|
|
43
|
+
'@mikrojs/no-dot-catch': 'error',
|
|
44
|
+
'@mikrojs/no-eval': 'error',
|
|
45
|
+
'@mikrojs/no-intl': 'error',
|
|
46
|
+
'@mikrojs/no-temporal': 'error',
|
|
47
|
+
'@mikrojs/no-sparse-arrays': 'warn',
|
|
66
48
|
},
|
|
67
49
|
},
|
|
68
|
-
|
|
69
|
-
// Error handling
|
|
70
|
-
'@mikrojs/no-unhandled-result': 'error',
|
|
71
|
-
'@mikrojs/no-throw': 'error',
|
|
72
|
-
'@mikrojs/no-try-catch': 'error',
|
|
73
|
-
'@mikrojs/no-promise-reject': 'error',
|
|
74
|
-
'@mikrojs/no-dot-catch': 'error',
|
|
75
|
-
// Floating promises (type-aware)
|
|
76
|
-
'@typescript-eslint/no-floating-promises': 'error',
|
|
77
|
-
// Performance & correctness
|
|
78
|
-
'@mikrojs/no-eval': 'error',
|
|
79
|
-
'@mikrojs/no-intl': 'error',
|
|
80
|
-
'@mikrojs/no-temporal': 'error',
|
|
81
|
-
'@mikrojs/no-sparse-arrays': 'warn',
|
|
82
|
-
},
|
|
83
|
-
}),
|
|
50
|
+
],
|
|
84
51
|
});
|
|
85
52
|
export default plugin;
|
|
86
53
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,GAAG;IACb,IAAI,EAAE;QACJ,IAAI,EAAE,wBAAwB;QAC9B,OAAO,EAAE,OAAO;KACjB;IACD,KAAK,EAAE;QACL,qBAAqB,EAAE,iBAAiB;QACxC,UAAU,EAAE,OAAO;QACnB,cAAc,EAAE,UAAU;QAC1B,mBAAmB,EAAE,eAAe;QACpC,cAAc,EAAE,UAAU;QAC1B,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,MAAM;QACjB,aAAa,EAAE,UAAU;QACzB,kBAAkB,EAAE,cAAc;KACnC;IACD,OAAO,EAAE,EAA+B;CACzC,CAAA;AAED,yDAAyD;AACzD,0EAA0E;AAC1E,yDAAyD;AACzD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;IAC5B,WAAW,EAAE;QACX;YACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;YAC9B,OAAO,EAAE;gBACP,UAAU,EAAE,MAAM;aACnB;YACD,KAAK,EAAE;gBACL,8BAA8B,EAAE,OAAO;gBACvC,mBAAmB,EAAE,OAAO;gBAC5B,uBAAuB,EAAE,OAAO;gBAChC,4BAA4B,EAAE,OAAO;gBACrC,uBAAuB,EAAE,OAAO;gBAChC,kBAAkB,EAAE,OAAO;gBAC3B,kBAAkB,EAAE,OAAO;gBAC3B,sBAAsB,EAAE,OAAO;gBAC/B,2BAA2B,EAAE,MAAM;aACpC;SACF;KACF;CACF,CAAC,CAAA;AAEF,eAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikrojs/eslint-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "ESLint plugin for Mikro.js projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
".": "./dist/index.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@typescript-eslint/utils": "^8.59.0"
|
|
30
|
-
"typescript-eslint": "8.58.0"
|
|
29
|
+
"@typescript-eslint/utils": "^8.59.0"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
32
|
"@typescript-eslint/rule-tester": "^8.59.0",
|