@drivenets/eslint-plugin-design-system 0.0.11 → 0.0.12
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +6 -0
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -79,6 +79,10 @@ const eslintPlugin = createPlugin("@drivenets/design-system", {
|
|
|
79
79
|
name: "no-deprecated-ds-chip-group",
|
|
80
80
|
selector: JSXElement("DsChipGroup"),
|
|
81
81
|
message: `DsChipGroup is deprecated. Use DsTagFilter instead.`
|
|
82
|
+
}, {
|
|
83
|
+
name: "no-deprecated-ds-date-input",
|
|
84
|
+
selector: JSXElement("DsDateInput"),
|
|
85
|
+
message: `DsDateInput is deprecated. Use DsDatePicker or DsDateRangePicker instead.`
|
|
82
86
|
}, {
|
|
83
87
|
name: "no-native-button",
|
|
84
88
|
selector: [
|
package/dist/index.d.cts
CHANGED
|
@@ -8,6 +8,6 @@ type Plugin<TRules extends string> = Omit<BasePlugin, 'rules'> & {
|
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/index.d.ts
|
|
11
|
-
declare const eslintPlugin: Plugin<"no-deprecated-ds-button-legacy-design" | "no-deprecated-ds-dialog" | "no-deprecated-ds-confirmation" | "no-deprecated-ds-system-status" | "no-deprecated-ds-dropdown-menu-legacy" | "no-deprecated-ds-radio-group-legacy" | "no-deprecated-ds-chip" | "no-deprecated-ds-chip-group" | "no-native-button" | "no-native-select" | "no-native-checkbox" | "no-native-radio" | "no-native-number-input" | "no-native-text-input" | "no-native-password-input" | "no-native-file-input" | "no-native-textarea" | "no-native-table" | "no-mui">;
|
|
11
|
+
declare const eslintPlugin: Plugin<"no-deprecated-ds-button-legacy-design" | "no-deprecated-ds-dialog" | "no-deprecated-ds-confirmation" | "no-deprecated-ds-system-status" | "no-deprecated-ds-dropdown-menu-legacy" | "no-deprecated-ds-radio-group-legacy" | "no-deprecated-ds-chip" | "no-deprecated-ds-chip-group" | "no-deprecated-ds-date-input" | "no-native-button" | "no-native-select" | "no-native-checkbox" | "no-native-radio" | "no-native-number-input" | "no-native-text-input" | "no-native-password-input" | "no-native-file-input" | "no-native-textarea" | "no-native-table" | "no-mui">;
|
|
12
12
|
export = eslintPlugin;
|
|
13
13
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/create-plugin.ts","../src/index.ts"],"mappings":";;;;KAIK,UAAA,GAAa,UAAA,QAAkB,MAAA;AAAA,KAExB,MAAA,0BAAgC,IAAA,CAAK,UAAA;EAChD,KAAA,EAAO,MAAA,CAAO,MAAA,EAAQ,cAAA;AAAA;;;cCJjB,YAAA,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/create-plugin.ts","../src/index.ts"],"mappings":";;;;KAIK,UAAA,GAAa,UAAA,QAAkB,MAAA;AAAA,KAExB,MAAA,0BAAgC,IAAA,CAAK,UAAA;EAChD,KAAA,EAAO,MAAA,CAAO,MAAA,EAAQ,cAAA;AAAA;;;cCJjB,YAAA,EAmIL,MAAA;AAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type Plugin<TRules extends string> = Omit<BasePlugin, 'rules'> & {
|
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/index.d.ts
|
|
11
|
-
declare const eslintPlugin: Plugin<"no-deprecated-ds-button-legacy-design" | "no-deprecated-ds-dialog" | "no-deprecated-ds-confirmation" | "no-deprecated-ds-system-status" | "no-deprecated-ds-dropdown-menu-legacy" | "no-deprecated-ds-radio-group-legacy" | "no-deprecated-ds-chip" | "no-deprecated-ds-chip-group" | "no-native-button" | "no-native-select" | "no-native-checkbox" | "no-native-radio" | "no-native-number-input" | "no-native-text-input" | "no-native-password-input" | "no-native-file-input" | "no-native-textarea" | "no-native-table" | "no-mui">;
|
|
11
|
+
declare const eslintPlugin: Plugin<"no-deprecated-ds-button-legacy-design" | "no-deprecated-ds-dialog" | "no-deprecated-ds-confirmation" | "no-deprecated-ds-system-status" | "no-deprecated-ds-dropdown-menu-legacy" | "no-deprecated-ds-radio-group-legacy" | "no-deprecated-ds-chip" | "no-deprecated-ds-chip-group" | "no-deprecated-ds-date-input" | "no-native-button" | "no-native-select" | "no-native-checkbox" | "no-native-radio" | "no-native-number-input" | "no-native-text-input" | "no-native-password-input" | "no-native-file-input" | "no-native-textarea" | "no-native-table" | "no-mui">;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { eslintPlugin as default };
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/create-plugin.ts","../src/index.ts"],"mappings":";;;;KAIK,UAAA,GAAa,UAAA,QAAkB,wBAAA;AAAA,KAExB,MAAA,0BAAgC,IAAA,CAAK,UAAA;EAChD,KAAA,EAAO,MAAA,CAAO,MAAA,EAAQ,cAAA;AAAA;;;cCJjB,YAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/create-plugin.ts","../src/index.ts"],"mappings":";;;;KAIK,UAAA,GAAa,UAAA,QAAkB,wBAAA;AAAA,KAExB,MAAA,0BAAgC,IAAA,CAAK,UAAA;EAChD,KAAA,EAAO,MAAA,CAAO,MAAA,EAAQ,cAAA;AAAA;;;cCJjB,YAAA,EAmIL,MAAA"}
|
package/dist/index.js
CHANGED
|
@@ -56,6 +56,10 @@ const eslintPlugin = createPlugin("@drivenets/design-system", {
|
|
|
56
56
|
name: "no-deprecated-ds-chip-group",
|
|
57
57
|
selector: JSXElement("DsChipGroup"),
|
|
58
58
|
message: `DsChipGroup is deprecated. Use DsTagFilter instead.`
|
|
59
|
+
}, {
|
|
60
|
+
name: "no-deprecated-ds-date-input",
|
|
61
|
+
selector: JSXElement("DsDateInput"),
|
|
62
|
+
message: `DsDateInput is deprecated. Use DsDatePicker or DsDateRangePicker instead.`
|
|
59
63
|
}, {
|
|
60
64
|
name: "no-native-button",
|
|
61
65
|
selector: [
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/selectors.ts","../src/create-plugin.ts","../src/index.ts"],"sourcesContent":["export function JSXElement(name: string, attributes: Record<string, string> = {}) {\n\tlet selector = `JSXOpeningElement[name.name='${name}']`;\n\n\tObject.entries(attributes).forEach(([attrName, attrValue]) => {\n\t\tselector += `:has( > ${JSXAttribute(attrName, attrValue)} )`;\n\t});\n\n\treturn selector;\n}\n\nexport function JSXAttribute(name: string, value?: string) {\n\tlet selector = `JSXAttribute[name.name='${name}']`;\n\n\tif (typeof value !== 'undefined') {\n\t\t// Match both expressions (prop={'value'}) and literal values (prop=\"value\").\n\t\tselector += `:matches([value.expression.value='${value}'], [value.value='${value}'])`;\n\t}\n\n\treturn selector;\n}\n","import type { RuleDefinition } from '@eslint/core';\nimport type create from 'eslint-no-restricted/syntax';\nimport createNoRestrictedSyntax from 'eslint-no-restricted/syntax';\n\ntype BasePlugin = ReturnType<typeof createNoRestrictedSyntax>;\n\nexport type Plugin<TRules extends string> = Omit<BasePlugin, 'rules'> & {\n\trules: Record<TRules, RuleDefinition>;\n};\n\n/**\n * Typed wrapper around `createNoRestrictedSyntax`.\n *\n * See: https://github.com/bradzacher/eslint-no-restricted/issues/13\n */\nexport function createPlugin<TRules extends string>(\n\tname: string,\n\t...rules: Array<create.RuleConfig<TRules>>\n): Plugin<TRules> {\n\treturn createNoRestrictedSyntax(name, ...rules) as Plugin<TRules>;\n}\n","import { JSXAttribute, JSXElement } from './selectors';\nimport { createPlugin } from './create-plugin';\n\nconst eslintPlugin = createPlugin(\n\t'@drivenets/design-system',\n\t{\n\t\tname: 'no-deprecated-ds-button-legacy-design',\n\t\tselector: [\n\t\t\tJSXElement('DsButton', { design: 'legacy' }),\n\t\t\t`${JSXElement('DsButton')}:not(:has( > ${JSXAttribute('design')} ))`,\n\t\t],\n\t\tmessage: `Using the 'legacy' design for DsButton is deprecated. Use 'v1.2' instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-dialog',\n\t\tselector: JSXElement('DsDialog'),\n\t\tmessage: `DsDialog is deprecated. Use DsModal or DsConfirmation instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-confirmation',\n\t\tselector: JSXElement('DsConfirmation'),\n\t\tmessage: `DsConfirmation is deprecated. Use DsModal instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-system-status',\n\t\tselector: JSXElement('DsSystemStatus'),\n\t\tmessage: `DsSystemStatus is deprecated. Use DsStatusBadge instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-dropdown-menu-legacy',\n\t\tselector: JSXElement('DsDropdownMenuLegacy'),\n\t\tmessage: `DsDropdownMenuLegacy is deprecated. Use DsDropdownMenu instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-radio-group-legacy',\n\t\tselector: JSXElement('DsRadioGroupLegacy'),\n\t\tmessage: `DsRadioGroupLegacy is deprecated. Use DsRadioGroup instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-chip',\n\t\tselector: JSXElement('DsChip'),\n\t\tmessage: `DsChip is deprecated. Use DsTag instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-chip-group',\n\t\tselector: JSXElement('DsChipGroup'),\n\t\tmessage: `DsChipGroup is deprecated. Use DsTagFilter instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-button',\n\t\tselector: [\n\t\t\tJSXElement('button'),\n\t\t\tJSXElement('input', { type: 'button' }),\n\t\t\tJSXElement('input', { type: 'submit' }),\n\t\t],\n\t\tmessage: `Using a native button is not allowed. Use DsButton instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-select',\n\t\tselector: JSXElement('select'),\n\t\tmessage: `Using a native select is not allowed. Use DsSelect or DsFormControl.Select instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-checkbox',\n\t\tselector: JSXElement('input', { type: 'checkbox' }),\n\t\tmessage: `Using a native checkbox is not allowed. Use DsCheckbox instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-radio',\n\t\tselector: JSXElement('input', { type: 'radio' }),\n\t\tmessage: `Using a native radio input is not allowed. Use DsRadioGroup instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-number-input',\n\t\tselector: JSXElement('input', { type: 'number' }),\n\t\tmessage: `Using a native number input is not allowed. Use DsNumberInput or DsFormControl.NumberInput instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-text-input',\n\t\tselector: [\n\t\t\tJSXElement('input', { type: 'text' }),\n\t\t\t`${JSXElement('input')}:not(:has( > ${JSXAttribute('type')} ))`,\n\t\t],\n\t\tmessage: `Using a native text input is not allowed. Use DsTextInput or DsFormControl.TextInput instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-password-input',\n\t\tselector: JSXElement('input', { type: 'password' }),\n\t\tmessage: `Using a native password input is not allowed. Use DsPasswordInput or DsFormControl.PasswordInput instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-file-input',\n\t\tselector: JSXElement('input', { type: 'file' }),\n\t\tmessage: `Using a native file input is not allowed. Use DsFileUpload instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-textarea',\n\t\tselector: JSXElement('textarea'),\n\t\tmessage: `Using a native textarea is not allowed. Use DsTextarea or DsFormControl.Textarea instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-table',\n\t\tselector: JSXElement('table'),\n\t\tmessage: `Using a native table is not allowed. Use DsTable instead.`,\n\t},\n\n\t{\n\t\tname: 'no-mui',\n\t\tselector: 'ImportDeclaration[source.value=/^@mui\\\\u002F/]',\n\t\tmessage: 'Using MUI components is not allowed. Use DriveNets Design System components instead.',\n\t},\n);\n\nexport default eslintPlugin;\n"],"mappings":";;AAAA,SAAgB,WAAW,MAAc,aAAqC,EAAE,EAAE;CACjF,IAAI,WAAW,gCAAgC,KAAK;AAEpD,QAAO,QAAQ,WAAW,CAAC,SAAS,CAAC,UAAU,eAAe;AAC7D,cAAY,WAAW,aAAa,UAAU,UAAU,CAAC;GACxD;AAEF,QAAO;;AAGR,SAAgB,aAAa,MAAc,OAAgB;CAC1D,IAAI,WAAW,2BAA2B,KAAK;AAE/C,KAAI,OAAO,UAAU,YAEpB,aAAY,qCAAqC,MAAM,oBAAoB,MAAM;AAGlF,QAAO;;;;;;;;;ACHR,SAAgB,aACf,MACA,GAAG,OACc;AACjB,QAAO,yBAAyB,MAAM,GAAG,MAAM;;;;AChBhD,MAAM,eAAe,aACpB,4BACA;CACC,MAAM;CACN,UAAU,CACT,WAAW,YAAY,EAAE,QAAQ,UAAU,CAAC,EAC5C,GAAG,WAAW,WAAW,CAAC,eAAe,aAAa,SAAS,CAAC,KAChE;CACD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,WAAW;CAChC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,iBAAiB;CACtC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,iBAAiB;CACtC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,uBAAuB;CAC5C,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,qBAAqB;CAC1C,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS;CAC9B,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,cAAc;CACnC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU;EACT,WAAW,SAAS;EACpB,WAAW,SAAS,EAAE,MAAM,UAAU,CAAC;EACvC,WAAW,SAAS,EAAE,MAAM,UAAU,CAAC;EACvC;CACD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS;CAC9B,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,YAAY,CAAC;CACnD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,SAAS,CAAC;CAChD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,UAAU,CAAC;CACjD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,CACT,WAAW,SAAS,EAAE,MAAM,QAAQ,CAAC,EACrC,GAAG,WAAW,QAAQ,CAAC,eAAe,aAAa,OAAO,CAAC,KAC3D;CACD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,YAAY,CAAC;CACnD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,QAAQ,CAAC;CAC/C,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,WAAW;CAChC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,QAAQ;CAC7B,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU;CACV,SAAS;CACT,CACD"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/selectors.ts","../src/create-plugin.ts","../src/index.ts"],"sourcesContent":["export function JSXElement(name: string, attributes: Record<string, string> = {}) {\n\tlet selector = `JSXOpeningElement[name.name='${name}']`;\n\n\tObject.entries(attributes).forEach(([attrName, attrValue]) => {\n\t\tselector += `:has( > ${JSXAttribute(attrName, attrValue)} )`;\n\t});\n\n\treturn selector;\n}\n\nexport function JSXAttribute(name: string, value?: string) {\n\tlet selector = `JSXAttribute[name.name='${name}']`;\n\n\tif (typeof value !== 'undefined') {\n\t\t// Match both expressions (prop={'value'}) and literal values (prop=\"value\").\n\t\tselector += `:matches([value.expression.value='${value}'], [value.value='${value}'])`;\n\t}\n\n\treturn selector;\n}\n","import type { RuleDefinition } from '@eslint/core';\nimport type create from 'eslint-no-restricted/syntax';\nimport createNoRestrictedSyntax from 'eslint-no-restricted/syntax';\n\ntype BasePlugin = ReturnType<typeof createNoRestrictedSyntax>;\n\nexport type Plugin<TRules extends string> = Omit<BasePlugin, 'rules'> & {\n\trules: Record<TRules, RuleDefinition>;\n};\n\n/**\n * Typed wrapper around `createNoRestrictedSyntax`.\n *\n * See: https://github.com/bradzacher/eslint-no-restricted/issues/13\n */\nexport function createPlugin<TRules extends string>(\n\tname: string,\n\t...rules: Array<create.RuleConfig<TRules>>\n): Plugin<TRules> {\n\treturn createNoRestrictedSyntax(name, ...rules) as Plugin<TRules>;\n}\n","import { JSXAttribute, JSXElement } from './selectors';\nimport { createPlugin } from './create-plugin';\n\nconst eslintPlugin = createPlugin(\n\t'@drivenets/design-system',\n\t{\n\t\tname: 'no-deprecated-ds-button-legacy-design',\n\t\tselector: [\n\t\t\tJSXElement('DsButton', { design: 'legacy' }),\n\t\t\t`${JSXElement('DsButton')}:not(:has( > ${JSXAttribute('design')} ))`,\n\t\t],\n\t\tmessage: `Using the 'legacy' design for DsButton is deprecated. Use 'v1.2' instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-dialog',\n\t\tselector: JSXElement('DsDialog'),\n\t\tmessage: `DsDialog is deprecated. Use DsModal or DsConfirmation instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-confirmation',\n\t\tselector: JSXElement('DsConfirmation'),\n\t\tmessage: `DsConfirmation is deprecated. Use DsModal instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-system-status',\n\t\tselector: JSXElement('DsSystemStatus'),\n\t\tmessage: `DsSystemStatus is deprecated. Use DsStatusBadge instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-dropdown-menu-legacy',\n\t\tselector: JSXElement('DsDropdownMenuLegacy'),\n\t\tmessage: `DsDropdownMenuLegacy is deprecated. Use DsDropdownMenu instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-radio-group-legacy',\n\t\tselector: JSXElement('DsRadioGroupLegacy'),\n\t\tmessage: `DsRadioGroupLegacy is deprecated. Use DsRadioGroup instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-chip',\n\t\tselector: JSXElement('DsChip'),\n\t\tmessage: `DsChip is deprecated. Use DsTag instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-chip-group',\n\t\tselector: JSXElement('DsChipGroup'),\n\t\tmessage: `DsChipGroup is deprecated. Use DsTagFilter instead.`,\n\t},\n\n\t{\n\t\tname: 'no-deprecated-ds-date-input',\n\t\tselector: JSXElement('DsDateInput'),\n\t\tmessage: `DsDateInput is deprecated. Use DsDatePicker or DsDateRangePicker instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-button',\n\t\tselector: [\n\t\t\tJSXElement('button'),\n\t\t\tJSXElement('input', { type: 'button' }),\n\t\t\tJSXElement('input', { type: 'submit' }),\n\t\t],\n\t\tmessage: `Using a native button is not allowed. Use DsButton instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-select',\n\t\tselector: JSXElement('select'),\n\t\tmessage: `Using a native select is not allowed. Use DsSelect or DsFormControl.Select instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-checkbox',\n\t\tselector: JSXElement('input', { type: 'checkbox' }),\n\t\tmessage: `Using a native checkbox is not allowed. Use DsCheckbox instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-radio',\n\t\tselector: JSXElement('input', { type: 'radio' }),\n\t\tmessage: `Using a native radio input is not allowed. Use DsRadioGroup instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-number-input',\n\t\tselector: JSXElement('input', { type: 'number' }),\n\t\tmessage: `Using a native number input is not allowed. Use DsNumberInput or DsFormControl.NumberInput instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-text-input',\n\t\tselector: [\n\t\t\tJSXElement('input', { type: 'text' }),\n\t\t\t`${JSXElement('input')}:not(:has( > ${JSXAttribute('type')} ))`,\n\t\t],\n\t\tmessage: `Using a native text input is not allowed. Use DsTextInput or DsFormControl.TextInput instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-password-input',\n\t\tselector: JSXElement('input', { type: 'password' }),\n\t\tmessage: `Using a native password input is not allowed. Use DsPasswordInput or DsFormControl.PasswordInput instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-file-input',\n\t\tselector: JSXElement('input', { type: 'file' }),\n\t\tmessage: `Using a native file input is not allowed. Use DsFileUpload instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-textarea',\n\t\tselector: JSXElement('textarea'),\n\t\tmessage: `Using a native textarea is not allowed. Use DsTextarea or DsFormControl.Textarea instead.`,\n\t},\n\n\t{\n\t\tname: 'no-native-table',\n\t\tselector: JSXElement('table'),\n\t\tmessage: `Using a native table is not allowed. Use DsTable instead.`,\n\t},\n\n\t{\n\t\tname: 'no-mui',\n\t\tselector: 'ImportDeclaration[source.value=/^@mui\\\\u002F/]',\n\t\tmessage: 'Using MUI components is not allowed. Use DriveNets Design System components instead.',\n\t},\n);\n\nexport default eslintPlugin;\n"],"mappings":";;AAAA,SAAgB,WAAW,MAAc,aAAqC,EAAE,EAAE;CACjF,IAAI,WAAW,gCAAgC,KAAK;AAEpD,QAAO,QAAQ,WAAW,CAAC,SAAS,CAAC,UAAU,eAAe;AAC7D,cAAY,WAAW,aAAa,UAAU,UAAU,CAAC;GACxD;AAEF,QAAO;;AAGR,SAAgB,aAAa,MAAc,OAAgB;CAC1D,IAAI,WAAW,2BAA2B,KAAK;AAE/C,KAAI,OAAO,UAAU,YAEpB,aAAY,qCAAqC,MAAM,oBAAoB,MAAM;AAGlF,QAAO;;;;;;;;;ACHR,SAAgB,aACf,MACA,GAAG,OACc;AACjB,QAAO,yBAAyB,MAAM,GAAG,MAAM;;;;AChBhD,MAAM,eAAe,aACpB,4BACA;CACC,MAAM;CACN,UAAU,CACT,WAAW,YAAY,EAAE,QAAQ,UAAU,CAAC,EAC5C,GAAG,WAAW,WAAW,CAAC,eAAe,aAAa,SAAS,CAAC,KAChE;CACD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,WAAW;CAChC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,iBAAiB;CACtC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,iBAAiB;CACtC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,uBAAuB;CAC5C,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,qBAAqB;CAC1C,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS;CAC9B,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,cAAc;CACnC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,cAAc;CACnC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU;EACT,WAAW,SAAS;EACpB,WAAW,SAAS,EAAE,MAAM,UAAU,CAAC;EACvC,WAAW,SAAS,EAAE,MAAM,UAAU,CAAC;EACvC;CACD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS;CAC9B,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,YAAY,CAAC;CACnD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,SAAS,CAAC;CAChD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,UAAU,CAAC;CACjD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,CACT,WAAW,SAAS,EAAE,MAAM,QAAQ,CAAC,EACrC,GAAG,WAAW,QAAQ,CAAC,eAAe,aAAa,OAAO,CAAC,KAC3D;CACD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,YAAY,CAAC;CACnD,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,SAAS,EAAE,MAAM,QAAQ,CAAC;CAC/C,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,WAAW;CAChC,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU,WAAW,QAAQ;CAC7B,SAAS;CACT,EAED;CACC,MAAM;CACN,UAAU;CACV,SAAS;CACT,CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivenets/eslint-plugin-design-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
39
|
-
"@vitest/coverage-v8": "^4.0
|
|
39
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
40
40
|
"eslint": "^10.0.1",
|
|
41
41
|
"publint": "^0.3.18",
|
|
42
42
|
"tsdown": "^0.21.0",
|
|
43
43
|
"typescript": "^5.9.3",
|
|
44
|
-
"vitest": "^4.0
|
|
44
|
+
"vitest": "^4.1.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@typescript-eslint/parser": "^8.50.0",
|
package/src/index.ts
CHANGED
|
@@ -54,6 +54,12 @@ const eslintPlugin = createPlugin(
|
|
|
54
54
|
message: `DsChipGroup is deprecated. Use DsTagFilter instead.`,
|
|
55
55
|
},
|
|
56
56
|
|
|
57
|
+
{
|
|
58
|
+
name: 'no-deprecated-ds-date-input',
|
|
59
|
+
selector: JSXElement('DsDateInput'),
|
|
60
|
+
message: `DsDateInput is deprecated. Use DsDatePicker or DsDateRangePicker instead.`,
|
|
61
|
+
},
|
|
62
|
+
|
|
57
63
|
{
|
|
58
64
|
name: 'no-native-button',
|
|
59
65
|
selector: [
|