@drivenets/eslint-plugin-design-system 0.0.3 → 0.0.4
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@ const require_selectors = require('./selectors.cjs');
|
|
|
2
2
|
const require_create_plugin = require('./create-plugin.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
const eslintPlugin = require_create_plugin.createPlugin("drivenets
|
|
5
|
+
const eslintPlugin = require_create_plugin.createPlugin("@drivenets/design-system", {
|
|
6
6
|
name: "no-deprecated-ds-button-legacy-design",
|
|
7
7
|
selector: [require_selectors.JSXElement("DsButton", { design: "legacy" }), `${require_selectors.JSXElement("DsButton")}:not(:has( > ${require_selectors.JSXAttribute("design")} ))`],
|
|
8
8
|
message: `Using the 'legacy' design for DsButton is deprecated. Use 'v1.2' instead.`
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { JSXAttribute, JSXElement } from "./selectors.js";
|
|
|
2
2
|
import { createPlugin } from "./create-plugin.js";
|
|
3
3
|
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
const eslintPlugin = createPlugin("drivenets
|
|
5
|
+
const eslintPlugin = createPlugin("@drivenets/design-system", {
|
|
6
6
|
name: "no-deprecated-ds-button-legacy-design",
|
|
7
7
|
selector: [JSXElement("DsButton", { design: "legacy" }), `${JSXElement("DsButton")}:not(:has( > ${JSXAttribute("design")} ))`],
|
|
8
8
|
message: `Using the 'legacy' design for DsButton is deprecated. Use 'v1.2' instead.`
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { JSXAttribute, JSXElement } from './selectors';\nimport { createPlugin } from './create-plugin';\n\nconst eslintPlugin = createPlugin(\n\t'drivenets
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["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-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-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":";;;;AAGA,MAAM,eAAe,aACpB,4BACA;CACC,MAA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;CACC,MAAM;CACN,UAAU;CACV,SAAS;CACT,CACD;AAED,kBAAe"}
|
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.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"./src",
|
|
27
27
|
"!**/__tests__"
|
|
28
28
|
],
|
|
29
|
+
"repository": {
|
|
30
|
+
"url": "https://github.com/drivenets/design-system",
|
|
31
|
+
"directory": "/packages/eslint-plugin"
|
|
32
|
+
},
|
|
29
33
|
"dependencies": {
|
|
30
34
|
"@eslint/core": "^1.0.0",
|
|
31
35
|
"eslint-no-restricted": "^0.0.9"
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { JSXAttribute, JSXElement } from './selectors';
|
|
|
2
2
|
import { createPlugin } from './create-plugin';
|
|
3
3
|
|
|
4
4
|
const eslintPlugin = createPlugin(
|
|
5
|
-
'drivenets
|
|
5
|
+
'@drivenets/design-system',
|
|
6
6
|
{
|
|
7
7
|
name: 'no-deprecated-ds-button-legacy-design',
|
|
8
8
|
selector: [
|