Skip to content

Commit 362232e

Browse files
authored
chore: Restrict value import from highcharts with eslint rule (#50)
* chore: Restrict value import from highcharts with eslint rule * update rule description
1 parent 892bd75 commit 362232e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.eslintrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,19 @@
9595
"es6": true,
9696
},
9797
"overrides": [
98+
{
99+
"files": ["src/**"],
100+
"excludedFiles": ["src/**/__tests__/**"],
101+
"rules": {
102+
"no-restricted-syntax": [
103+
"error",
104+
{
105+
"selector": "ImportDeclaration[source.value='highcharts'][importKind='value']",
106+
"message": "Use `import type Highcharts from 'highcharts'` instead of regular import.",
107+
},
108+
],
109+
},
110+
},
98111
{
99112
"files": ["**/__integ__/**", "./test/**"],
100113
"rules": {

0 commit comments

Comments
 (0)