',
- errors: ['Parsing error: x-invalid-namespace.']
+ errors: [
+ {
+ message: 'Parsing error: x-invalid-namespace.',
+ line: 1,
+ column: 16
+ }
+ ]
},
//style vars
diff --git a/tests/lib/rules/no-potential-component-option-typo.js b/tests/lib/rules/no-potential-component-option-typo.js
index 0b9fad541..63a6a42cf 100644
--- a/tests/lib/rules/no-potential-component-option-typo.js
+++ b/tests/lib/rules/no-potential-component-option-typo.js
@@ -183,6 +183,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: "'dat' may be a typo, which is similar to option [data].",
line: 4,
column: 9,
+ endLine: 4,
+ endColumn: 12,
suggestions: [
{
desc: `Replace property 'dat' to 'data'`,
@@ -200,6 +202,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: `'method' may be a typo, which is similar to option [methods].`,
line: 5,
column: 9,
+ endLine: 5,
+ endColumn: 15,
suggestions: [
{
desc: `Replace property 'method' to 'methods'`,
@@ -235,6 +239,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: "'dat' may be a typo, which is similar to option [data].",
line: 4,
column: 9,
+ endLine: 4,
+ endColumn: 12,
suggestions: [
{
desc: `Replace property 'dat' to 'data'`,
@@ -253,6 +259,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: `'method' may be a typo, which is similar to option [methods].`,
line: 5,
column: 9,
+ endLine: 5,
+ endColumn: 15,
suggestions: [
{
desc: `Replace property 'method' to 'methods'`,
@@ -271,6 +279,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: `'custo' may be a typo, which is similar to option [custom].`,
line: 6,
column: 9,
+ endLine: 6,
+ endColumn: 14,
suggestions: [
{
desc: `Replace property 'custo' to 'custom'`,
@@ -303,6 +313,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: "'dat' may be a typo, which is similar to option [data].",
line: 4,
column: 9,
+ endLine: 4,
+ endColumn: 12,
suggestions: [
{
desc: `Replace property 'dat' to 'data'`,
@@ -320,6 +332,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: `'method' may be a typo, which is similar to option [methods].`,
line: 5,
column: 9,
+ endLine: 5,
+ endColumn: 15,
suggestions: [
{
desc: `Replace property 'method' to 'methods'`,
@@ -352,6 +366,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: "'dat' may be a typo, which is similar to option [data].",
line: 4,
column: 9,
+ endLine: 4,
+ endColumn: 12,
suggestions: [
{
desc: `Replace property 'dat' to 'data'`,
@@ -371,6 +387,8 @@ tester.run('no-potential-component-option-typo', rule, {
"'beforeRouteEntr' may be a typo, which is similar to option [beforeRouteEnter].",
line: 5,
column: 9,
+ endLine: 5,
+ endColumn: 24,
suggestions: [
{
desc: `Replace property 'beforeRouteEntr' to 'beforeRouteEnter'`,
@@ -389,6 +407,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: `'method' may be a typo, which is similar to option [methods].`,
line: 6,
column: 9,
+ endLine: 6,
+ endColumn: 15,
suggestions: [
{
desc: `Replace property 'method' to 'methods'`,
@@ -420,6 +440,8 @@ tester.run('no-potential-component-option-typo', rule, {
message: `'method' may be a typo, which is similar to option [methods,data].`,
line: 4,
column: 9,
+ endLine: 4,
+ endColumn: 15,
suggestions: [
{
desc: `Replace property 'method' to 'methods'`,
diff --git a/tests/lib/rules/no-ref-as-operand.js b/tests/lib/rules/no-ref-as-operand.js
index 9db2ab3a0..86cd7bd54 100644
--- a/tests/lib/rules/no-ref-as-operand.js
+++ b/tests/lib/rules/no-ref-as-operand.js
@@ -490,7 +490,10 @@ tester.run('no-ref-as-operand', rule, {
errors: [
{
messageId: 'requireDotValue',
- line: 4
+ line: 4,
+ column: 11,
+ endLine: 4,
+ endColumn: 14
}
]
},
@@ -512,7 +515,10 @@ tester.run('no-ref-as-operand', rule, {
errors: [
{
messageId: 'requireDotValue',
- line: 4
+ line: 4,
+ column: 15,
+ endLine: 4,
+ endColumn: 18
}
]
},
@@ -536,19 +542,31 @@ tester.run('no-ref-as-operand', rule, {
errors: [
{
messageId: 'requireDotValue',
- line: 4
+ line: 4,
+ column: 16,
+ endLine: 4,
+ endColumn: 19
},
{
messageId: 'requireDotValue',
- line: 5
+ line: 5,
+ column: 16,
+ endLine: 5,
+ endColumn: 19
},
{
messageId: 'requireDotValue',
- line: 6
+ line: 6,
+ column: 16,
+ endLine: 6,
+ endColumn: 19
},
{
messageId: 'requireDotValue',
- line: 7
+ line: 7,
+ column: 16,
+ endLine: 7,
+ endColumn: 19
}
]
},
@@ -572,19 +590,31 @@ tester.run('no-ref-as-operand', rule, {
errors: [
{
messageId: 'requireDotValue',
- line: 4
+ line: 4,
+ column: 7,
+ endLine: 4,
+ endColumn: 10
},
{
messageId: 'requireDotValue',
- line: 5
+ line: 5,
+ column: 7,
+ endLine: 5,
+ endColumn: 10
},
{
messageId: 'requireDotValue',
- line: 6
+ line: 6,
+ column: 14,
+ endLine: 6,
+ endColumn: 17
},
{
messageId: 'requireDotValue',
- line: 7
+ line: 7,
+ column: 14,
+ endLine: 7,
+ endColumn: 17
}
]
},
@@ -604,11 +634,17 @@ tester.run('no-ref-as-operand', rule, {
errors: [
{
messageId: 'requireDotValue',
- line: 4
+ line: 4,
+ column: 15,
+ endLine: 4,
+ endColumn: 18
},
{
messageId: 'requireDotValue',
- line: 5
+ line: 5,
+ column: 15,
+ endLine: 5,
+ endColumn: 18
}
]
},
@@ -626,7 +662,10 @@ tester.run('no-ref-as-operand', rule, {
errors: [
{
messageId: 'requireDotValue',
- line: 4
+ line: 4,
+ column: 15,
+ endLine: 4,
+ endColumn: 18
}
]
},
@@ -666,15 +705,24 @@ tester.run('no-ref-as-operand', rule, {
errors: [
{
messageId: 'requireDotValue',
- line: 7
+ line: 7,
+ column: 13,
+ endLine: 7,
+ endColumn: 18
},
{
messageId: 'requireDotValue',
- line: 8
+ line: 8,
+ column: 25,
+ endLine: 8,
+ endColumn: 30
},
{
messageId: 'requireDotValue',
- line: 9
+ line: 9,
+ column: 29,
+ endLine: 9,
+ endColumn: 34
}
]
},
@@ -763,27 +811,42 @@ tester.run('no-ref-as-operand', rule, {
{
message:
'Must use `.value` to read or write the value wrapped by `ref()`.',
- line: 33
+ line: 33,
+ column: 9,
+ endLine: 33,
+ endColumn: 14
},
{
message:
'Must use `.value` to read or write the value wrapped by `computed()`.',
- line: 34
+ line: 34,
+ column: 9,
+ endLine: 34,
+ endColumn: 15
},
{
message:
'Must use `.value` to read or write the value wrapped by `toRef()`.',
- line: 36
+ line: 36,
+ column: 22,
+ endLine: 36,
+ endColumn: 28
},
{
message:
'Must use `.value` to read or write the value wrapped by `customRef()`.',
- line: 36
+ line: 36,
+ column: 34,
+ endLine: 36,
+ endColumn: 38
},
{
message:
'Must use `.value` to read or write the value wrapped by `shallowRef()`.',
- line: 38
+ line: 38,
+ column: 19,
+ endLine: 38,
+ endColumn: 22
}
]
},
@@ -804,7 +867,11 @@ tester.run('no-ref-as-operand', rule, {
`,
errors: [
{
- messageId: 'requireDotValue'
+ messageId: 'requireDotValue',
+ line: 5,
+ column: 9,
+ endLine: 5,
+ endColumn: 12
}
]
},
@@ -825,7 +892,11 @@ tester.run('no-ref-as-operand', rule, {
`,
errors: [
{
- messageId: 'requireDotValue'
+ messageId: 'requireDotValue',
+ line: 5,
+ column: 21,
+ endLine: 5,
+ endColumn: 24
}
]
},
@@ -859,7 +930,9 @@ tester.run('no-ref-as-operand', rule, {
message:
'Must use `.value` to read or write the value wrapped by `ref()`.',
line: 10,
- column: 7
+ column: 7,
+ endLine: 10,
+ endColumn: 10
}
]
},
@@ -892,12 +965,18 @@ tester.run('no-ref-as-operand', rule, {
{
message:
'Must use `.value` to read or write the value wrapped by `defineModel()`.',
- line: 6
+ line: 6,
+ column: 13,
+ endLine: 6,
+ endColumn: 18
},
{
message:
'Must use `.value` to read or write the value wrapped by `defineModel()`.',
- line: 9
+ line: 9,
+ column: 9,
+ endLine: 9,
+ endColumn: 14
}
]
},
@@ -930,12 +1009,18 @@ tester.run('no-ref-as-operand', rule, {
{
message:
'Must use `.value` to read or write the value wrapped by `defineModel()`.',
- line: 6
+ line: 6,
+ column: 13,
+ endLine: 6,
+ endColumn: 18
},
{
message:
'Must use `.value` to read or write the value wrapped by `defineModel()`.',
- line: 9
+ line: 9,
+ column: 9,
+ endLine: 9,
+ endColumn: 14
}
]
},
@@ -967,7 +1052,9 @@ tester.run('no-ref-as-operand', rule, {
message:
'Must use `.value` to read or write the value wrapped by `ref()`.',
line: 8,
- endLine: 8
+ column: 23,
+ endLine: 8,
+ endColumn: 28
}
]
},
@@ -1013,7 +1100,9 @@ tester.run('no-ref-as-operand', rule, {
message:
'Must use `.value` to read or write the value wrapped by `ref()`.',
line: 10,
- endLine: 10
+ column: 35,
+ endLine: 10,
+ endColumn: 42
}
]
},
@@ -1059,7 +1148,9 @@ tester.run('no-ref-as-operand', rule, {
message:
'Must use `.value` to read or write the value wrapped by `ref()`.',
line: 10,
- endLine: 10
+ column: 31,
+ endLine: 10,
+ endColumn: 38
}
]
},
@@ -1105,7 +1196,9 @@ tester.run('no-ref-as-operand', rule, {
message:
'Must use `.value` to read or write the value wrapped by `ref()`.',
line: 10,
- endLine: 10
+ column: 38,
+ endLine: 10,
+ endColumn: 45
}
]
},
diff --git a/tests/lib/rules/no-side-effects-in-computed-properties.js b/tests/lib/rules/no-side-effects-in-computed-properties.js
index 6cb6d6284..2d0a124a4 100644
--- a/tests/lib/rules/no-side-effects-in-computed-properties.js
+++ b/tests/lib/rules/no-side-effects-in-computed-properties.js
@@ -296,32 +296,53 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
})`,
errors: [
{
+ message: 'Unexpected side effect in "test1" computed property.',
line: 4,
- message: 'Unexpected side effect in "test1" computed property.'
+ column: 13,
+ endLine: 4,
+ endColumn: 37
},
{
+ message: 'Unexpected side effect in "test2" computed property.',
line: 9,
- message: 'Unexpected side effect in "test2" computed property.'
+ column: 13,
+ endLine: 9,
+ endColumn: 28
},
{
+ message: 'Unexpected side effect in "test2" computed property.',
line: 10,
- message: 'Unexpected side effect in "test2" computed property.'
+ column: 13,
+ endLine: 10,
+ endColumn: 25
},
{
+ message: 'Unexpected side effect in "test3" computed property.',
line: 14,
- message: 'Unexpected side effect in "test3" computed property.'
+ column: 20,
+ endLine: 14,
+ endColumn: 44
},
{
+ message: 'Unexpected side effect in "test4" computed property.',
line: 17,
- message: 'Unexpected side effect in "test4" computed property.'
+ column: 26,
+ endLine: 17,
+ endColumn: 64
},
{
+ message: 'Unexpected side effect in "test5" computed property.',
line: 21,
- message: 'Unexpected side effect in "test5" computed property.'
+ column: 13,
+ endLine: 21,
+ endColumn: 49
},
{
+ message: 'Unexpected side effect in "test6" computed property.',
line: 25,
- message: 'Unexpected side effect in "test6" computed property.'
+ column: 20,
+ endLine: 25,
+ endColumn: 46
}
]
},
@@ -359,24 +380,39 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
})`,
errors: [
{
+ message: 'Unexpected side effect in "test1" computed property.',
line: 5,
- message: 'Unexpected side effect in "test1" computed property.'
+ column: 15,
+ endLine: 5,
+ endColumn: 39
},
{
+ message: 'Unexpected side effect in "test2" computed property.',
line: 11,
- message: 'Unexpected side effect in "test2" computed property.'
+ column: 15,
+ endLine: 11,
+ endColumn: 30
},
{
+ message: 'Unexpected side effect in "test2" computed property.',
line: 12,
- message: 'Unexpected side effect in "test2" computed property.'
+ column: 15,
+ endLine: 12,
+ endColumn: 27
},
{
+ message: 'Unexpected side effect in "test3" computed property.',
line: 18,
- message: 'Unexpected side effect in "test3" computed property.'
+ column: 22,
+ endLine: 18,
+ endColumn: 46
},
{
+ message: 'Unexpected side effect in "test4" computed property.',
line: 23,
- message: 'Unexpected side effect in "test4" computed property.'
+ column: 28,
+ endLine: 23,
+ endColumn: 66
}
]
},
@@ -394,8 +430,11 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
languageOptions: { parser: require('@typescript-eslint/parser') },
errors: [
{
+ message: 'Unexpected side effect in "test1" computed property.',
line: 5,
- message: 'Unexpected side effect in "test1" computed property.'
+ column: 22,
+ endLine: 5,
+ endColumn: 46
}
]
},
@@ -412,8 +451,11 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
})`,
errors: [
{
+ message: 'Unexpected side effect in "test1" computed property.',
line: 4,
- message: 'Unexpected side effect in "test1" computed property.'
+ column: 13,
+ endLine: 4,
+ endColumn: 37
}
]
},
@@ -432,9 +474,27 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
}
})`,
errors: [
- 'Unexpected side effect in "test1" computed property.',
- 'Unexpected side effect in "test2" computed property.',
- 'Unexpected side effect in "test3" computed property.'
+ {
+ message: 'Unexpected side effect in "test1" computed property.',
+ line: 4,
+ column: 20,
+ endLine: 4,
+ endColumn: 48
+ },
+ {
+ message: 'Unexpected side effect in "test2" computed property.',
+ line: 7,
+ column: 20,
+ endLine: 7,
+ endColumn: 50
+ },
+ {
+ message: 'Unexpected side effect in "test3" computed property.',
+ line: 10,
+ column: 20,
+ endLine: 10,
+ endColumn: 50
+ }
]
},
{
@@ -450,12 +510,18 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
})`,
errors: [
{
+ message: 'Unexpected side effect in "fooBar" computed property.',
line: 4,
- message: 'Unexpected side effect in "fooBar" computed property.'
+ column: 18,
+ endLine: 4,
+ endColumn: 22
},
{
+ message: 'Unexpected side effect in "fooBar" computed property.',
line: 5,
- message: 'Unexpected side effect in "fooBar" computed property.'
+ column: 17,
+ endLine: 5,
+ endColumn: 20
}
]
},
@@ -514,52 +580,88 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
`,
errors: [
{
+ message: 'Unexpected side effect in computed function.',
line: 12,
- message: 'Unexpected side effect in computed function.'
+ column: 13,
+ endLine: 12,
+ endColumn: 36
},
{
+ message: 'Unexpected side effect in computed function.',
line: 13,
- message: 'Unexpected side effect in computed function.'
+ column: 13,
+ endLine: 13,
+ endColumn: 34
},
{
+ message: 'Unexpected side effect in computed function.',
line: 17,
- message: 'Unexpected side effect in computed function.'
+ column: 13,
+ endLine: 17,
+ endColumn: 27
},
{
+ message: 'Unexpected side effect in computed function.',
line: 18,
- message: 'Unexpected side effect in computed function.'
+ column: 13,
+ endLine: 18,
+ endColumn: 24
},
{
+ message: 'Unexpected side effect in computed function.',
line: 21,
- message: 'Unexpected side effect in computed function.'
+ column: 40,
+ endLine: 21,
+ endColumn: 63
},
{
+ message: 'Unexpected side effect in computed function.',
line: 23,
- message: 'Unexpected side effect in computed function.'
+ column: 26,
+ endLine: 23,
+ endColumn: 63
},
{
+ message: 'Unexpected side effect in computed function.',
line: 27,
- message: 'Unexpected side effect in computed function.'
+ column: 13,
+ endLine: 27,
+ endColumn: 52
},
{
+ message: 'Unexpected side effect in computed function.',
line: 30,
- message: 'Unexpected side effect in computed function.'
+ column: 40,
+ endLine: 30,
+ endColumn: 65
},
{
+ message: 'Unexpected side effect in computed function.',
line: 33,
- message: 'Unexpected side effect in computed function.'
+ column: 22,
+ endLine: 33,
+ endColumn: 45
},
{
+ message: 'Unexpected side effect in computed function.',
line: 37,
- message: 'Unexpected side effect in computed function.'
+ column: 13,
+ endLine: 37,
+ endColumn: 24
},
{
+ message: 'Unexpected side effect in computed function.',
line: 40,
- message: 'Unexpected side effect in computed function.'
+ column: 13,
+ endLine: 40,
+ endColumn: 24
},
{
+ message: 'Unexpected side effect in computed function.',
line: 42,
- message: 'Unexpected side effect in computed function.'
+ column: 42,
+ endLine: 42,
+ endColumn: 52
}
]
},
@@ -579,8 +681,11 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
`,
errors: [
{
+ message: 'Unexpected side effect in computed function.',
line: 8,
- message: 'Unexpected side effect in computed function.'
+ column: 40,
+ endLine: 8,
+ endColumn: 53
}
]
},
@@ -600,8 +705,11 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
`,
errors: [
{
+ message: 'Unexpected side effect in computed function.',
line: 8,
- message: 'Unexpected side effect in computed function.'
+ column: 40,
+ endLine: 8,
+ endColumn: 63
}
]
},
@@ -657,52 +765,88 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
`,
errors: [
{
+ message: 'Unexpected side effect in computed function.',
line: 10,
- message: 'Unexpected side effect in computed function.'
+ column: 9,
+ endLine: 10,
+ endColumn: 32
},
{
+ message: 'Unexpected side effect in computed function.',
line: 11,
- message: 'Unexpected side effect in computed function.'
+ column: 9,
+ endLine: 11,
+ endColumn: 30
},
{
+ message: 'Unexpected side effect in computed function.',
line: 15,
- message: 'Unexpected side effect in computed function.'
+ column: 9,
+ endLine: 15,
+ endColumn: 23
},
{
+ message: 'Unexpected side effect in computed function.',
line: 16,
- message: 'Unexpected side effect in computed function.'
+ column: 9,
+ endLine: 16,
+ endColumn: 20
},
{
+ message: 'Unexpected side effect in computed function.',
line: 19,
- message: 'Unexpected side effect in computed function.'
+ column: 36,
+ endLine: 19,
+ endColumn: 59
},
{
+ message: 'Unexpected side effect in computed function.',
line: 21,
- message: 'Unexpected side effect in computed function.'
+ column: 22,
+ endLine: 21,
+ endColumn: 59
},
{
+ message: 'Unexpected side effect in computed function.',
line: 25,
- message: 'Unexpected side effect in computed function.'
+ column: 9,
+ endLine: 25,
+ endColumn: 48
},
{
+ message: 'Unexpected side effect in computed function.',
line: 28,
- message: 'Unexpected side effect in computed function.'
+ column: 36,
+ endLine: 28,
+ endColumn: 61
},
{
+ message: 'Unexpected side effect in computed function.',
line: 31,
- message: 'Unexpected side effect in computed function.'
+ column: 18,
+ endLine: 31,
+ endColumn: 41
},
{
+ message: 'Unexpected side effect in computed function.',
line: 35,
- message: 'Unexpected side effect in computed function.'
+ column: 9,
+ endLine: 35,
+ endColumn: 20
},
{
+ message: 'Unexpected side effect in computed function.',
line: 38,
- message: 'Unexpected side effect in computed function.'
+ column: 9,
+ endLine: 38,
+ endColumn: 20
},
{
+ message: 'Unexpected side effect in computed function.',
line: 40,
- message: 'Unexpected side effect in computed function.'
+ column: 38,
+ endLine: 40,
+ endColumn: 48
}
]
},
@@ -718,8 +862,11 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
`,
errors: [
{
+ message: 'Unexpected side effect in computed function.',
line: 6,
- message: 'Unexpected side effect in computed function.'
+ column: 36,
+ endLine: 6,
+ endColumn: 49
}
]
},
@@ -735,8 +882,11 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
`,
errors: [
{
+ message: 'Unexpected side effect in computed function.',
line: 6,
- message: 'Unexpected side effect in computed function.'
+ column: 36,
+ endLine: 6,
+ endColumn: 59
}
]
}
diff --git a/tests/lib/rules/no-v-html.js b/tests/lib/rules/no-v-html.js
index d9ae67ca1..44d3a79c5 100644
--- a/tests/lib/rules/no-v-html.js
+++ b/tests/lib/rules/no-v-html.js
@@ -28,23 +28,66 @@ ruleTester.run('no-v-html', rule, {
{
filename: 'test.vue',
code: '
'
+ },
+ {
+ filename: 'test.vue',
+ code: '
',
+ options: [{ ignorePattern: '^html' }]
}
],
invalid: [
{
filename: 'test.vue',
code: '
',
- errors: ["'v-html' directive can lead to XSS attack."]
+ errors: [
+ {
+ message: "'v-html' directive can lead to XSS attack.",
+ line: 1,
+ column: 16,
+ endLine: 1,
+ endColumn: 28
+ }
+ ]
},
{
filename: 'test.vue',
code: '
',
- errors: ["'v-html' directive can lead to XSS attack."]
+ errors: [
+ {
+ message: "'v-html' directive can lead to XSS attack.",
+ line: 1,
+ column: 15,
+ endLine: 1,
+ endColumn: 36
+ }
+ ]
},
{
filename: 'test.vue',
code: '
',
- errors: ["'v-html' directive can lead to XSS attack."]
+ errors: [
+ {
+ message: "'v-html' directive can lead to XSS attack.",
+ line: 1,
+ column: 20,
+ endLine: 1,
+ endColumn: 26
+ }
+ ]
+ },
+ {
+ filename: 'test.vue',
+ code: '
',
+ options: [{ ignorePattern: '^html' }],
+ errors: [
+ {
+ message: "'v-html' directive can lead to XSS attack.",
+ line: 1,
+ column: 16,
+ endLine: 1,
+ endColumn: 37
+ }
+ ]
}
]
})
diff --git a/tests/test-utils/eslint-stylistic.js b/tests/test-utils/eslint-stylistic.js
new file mode 100644
index 000000000..81fc774f3
--- /dev/null
+++ b/tests/test-utils/eslint-stylistic.js
@@ -0,0 +1,16 @@
+const { existsSync, readFileSync } = require('node:fs')
+const path = require('node:path')
+
+const eslintStylisticPackagePath = path.join(
+ __dirname,
+ '../..',
+ 'node_modules',
+ '@stylistic',
+ 'eslint-plugin',
+ 'package.json'
+)
+const eslintStylisticVersion = existsSync(eslintStylisticPackagePath)
+ ? JSON.parse(readFileSync(eslintStylisticPackagePath, 'utf8')).version
+ : undefined
+
+module.exports = { eslintStylisticVersion }