@maltjoy/eslint-rules 0.2.0 → 0.2.1
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 +7 -5
- package/index.d.ts +15 -0
- package/index.js +3 -3
- package/package.json +12 -2
- package/rules/no-vjoybutton-circle.js +1 -1
- package/rules/no-vjoyinput-type-password.js +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Custom ESLint rules for Maltjoy design system usage.
|
|
4
4
|
|
|
5
|
+
This package is **ESM-only** (`"type": "module"`). Use `import` from `eslint.config.mjs` / `eslint.config.js` (with ESM).
|
|
6
|
+
|
|
5
7
|
## Rules
|
|
6
8
|
|
|
7
9
|
- `no-vjoybutton-circle`: disallow `circle` prop usage on `VJoyButton`.
|
|
@@ -17,10 +19,10 @@ Message:
|
|
|
17
19
|
**Preset (recommended)** — active toutes les règles du design system d’un coup :
|
|
18
20
|
|
|
19
21
|
```js
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
import maltjoyRules from '@maltjoy/eslint-rules';
|
|
23
|
+
import vueParser from 'vue-eslint-parser';
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
export default [
|
|
24
26
|
{
|
|
25
27
|
files: ['**/*.vue'],
|
|
26
28
|
languageOptions: {
|
|
@@ -45,9 +47,9 @@ Les sévérités par défaut du preset sont en `error`. Pour assouplir une règl
|
|
|
45
47
|
**Règles à la carte** (sans preset) :
|
|
46
48
|
|
|
47
49
|
```js
|
|
48
|
-
|
|
50
|
+
import maltjoyRules from '@maltjoy/eslint-rules';
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
export default [
|
|
51
53
|
{
|
|
52
54
|
plugins: {'@maltjoy/eslint-rules': maltjoyRules},
|
|
53
55
|
rules: {
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type {Linter, Rule} from 'eslint';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `@maltjoy/eslint-rules` — ESLint plugin (flat config) for Maltjoy Vue design-system rules.
|
|
5
|
+
*
|
|
6
|
+
* Types depend on the `eslint` package (peer dependency); install `eslint` in the project that consumes this plugin.
|
|
7
|
+
*/
|
|
8
|
+
declare const maltjoyEslintRules: {
|
|
9
|
+
readonly rules: Readonly<Record<string, Rule.RuleModule>>;
|
|
10
|
+
readonly configs: {
|
|
11
|
+
readonly recommended: ReadonlyArray<Linter.Config>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default maltjoyEslintRules;
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import noVJoyButtonCircle from './rules/no-vjoybutton-circle.js';
|
|
2
|
+
import noVJoyInputTypePassword from './rules/no-vjoyinput-type-password.js';
|
|
3
3
|
|
|
4
4
|
const rules = {
|
|
5
5
|
'no-vjoybutton-circle': noVJoyButtonCircle,
|
|
@@ -24,4 +24,4 @@ plugin.configs.recommended = [
|
|
|
24
24
|
},
|
|
25
25
|
];
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
export default plugin;
|
package/package.json
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maltjoy/eslint-rules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Custom ESLint rules for the @maltjoy/core-vue design system",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"import": "./index.js",
|
|
12
|
+
"default": "./index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
6
15
|
"files": [
|
|
7
16
|
"index.js",
|
|
17
|
+
"index.d.ts",
|
|
8
18
|
"rules",
|
|
9
19
|
"README.md"
|
|
10
20
|
],
|