@adyen/eslint-plugin-bento 2.0.0 → 2.1.0

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.0 (2025-08-27)
4
+
5
+ This was a version bump only for eslint to align it with other projects, there were no code changes.
6
+
7
+
8
+ ## [2.0.1](https://github.com/Adyen/bento/compare/eslint-plugin-bento-v2.0.0...eslint-plugin-bento-v2.0.1) (2025-06-04)
9
+
10
+
11
+ ### Tests
12
+
13
+ * **eslint:** changed all integration tests to use `execFileSync` with arguments ([7b96e11](https://github.com/Adyen/bento/commit/7b96e11b17acafc3eb9b7a04c6d13c0eb2aea17e))
14
+
3
15
  ## [2.0.0](https://github.com/Adyen/bento/compare/eslint-plugin-bento-v1.3.0...eslint-plugin-bento-v2.0.0) (2025-05-14)
4
16
 
5
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/eslint-plugin-bento",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Adyen Bento ESLint rules",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,8 +1,5 @@
1
- import { execSync } from 'node:child_process';
2
1
  import path from 'node:path';
3
-
4
- // ESLint command
5
- const ESLINT = 'pnpm eslint';
2
+ import { execFileSyncEslintVueFiles } from '../../utils/exec-file-sync-eslint-vue-files';
6
3
 
7
4
  describe('@adyen/bento/deprecation-currency-default-slot', () => {
8
5
  it('should lint with warning', () => {
@@ -12,11 +9,7 @@ describe('@adyen/bento/deprecation-currency-default-slot', () => {
12
9
  const vueFile = path.resolve(__dirname, '__tests__', 'deprecation-currency-default-slot.vue');
13
10
 
14
11
  // Execute the linter
15
- const result = JSON.parse(
16
- execSync(`${ESLINT} --format=json -c ${eslintrc} ${vueFile}`, {
17
- encoding: 'utf8',
18
- })
19
- );
12
+ const result = JSON.parse(execFileSyncEslintVueFiles(eslintrc, vueFile));
20
13
 
21
14
  // Expects a warning with a suggestion/fix and an error message
22
15
  expect(result[0].warningCount).toBe(1);
@@ -1,8 +1,5 @@
1
- import { execSync } from 'node:child_process';
2
1
  import path from 'node:path';
3
-
4
- // ESLint command
5
- const ESLINT = 'pnpm eslint';
2
+ import { execFileSyncEslintVueFiles } from '../../utils/exec-file-sync-eslint-vue-files';
6
3
 
7
4
  describe('@adyen/bento/deprecation-tag-default-slot', () => {
8
5
  it('should lint with warning', () => {
@@ -12,11 +9,7 @@ describe('@adyen/bento/deprecation-tag-default-slot', () => {
12
9
  const vueFile = path.resolve(__dirname, '__tests__', 'deprecation-tag-default-slot.vue');
13
10
 
14
11
  // Execute the linter
15
- const result = JSON.parse(
16
- execSync(`${ESLINT} --format=json -c ${eslintrc} ${vueFile}`, {
17
- encoding: 'utf8',
18
- })
19
- );
12
+ const result = JSON.parse(execFileSyncEslintVueFiles(eslintrc, vueFile));
20
13
 
21
14
  // Expects a warning with a suggestion/fix and an error message
22
15
  expect(result[0].warningCount).toBe(1);
@@ -1,8 +1,5 @@
1
- import { execSync } from 'node:child_process';
2
1
  import path from 'node:path';
3
-
4
- // ESLint command
5
- const ESLINT = 'pnpm eslint';
2
+ import { execFileSyncEslintVueFiles } from '../../utils/exec-file-sync-eslint-vue-files';
6
3
 
7
4
  describe('@adyen/bento/vue-old-spacer-tokens', () => {
8
5
  it('should lint with warning', () => {
@@ -12,11 +9,7 @@ describe('@adyen/bento/vue-old-spacer-tokens', () => {
12
9
  const vueFile = path.resolve(__dirname, '__tests__', 'vue-old-spacer-tokens.vue');
13
10
 
14
11
  // Execute the linter
15
- const result = JSON.parse(
16
- execSync(`${ESLINT} --format=json -c ${eslintrc} ${vueFile}`, {
17
- encoding: 'utf8',
18
- })
19
- );
12
+ const result = JSON.parse(execFileSyncEslintVueFiles(eslintrc, vueFile));
20
13
 
21
14
  // Expects a warning with a suggestion/fix and an error message
22
15
  expect(result[0].warningCount).toBe(1);
@@ -0,0 +1,11 @@
1
+ import { execFileSync } from 'node:child_process';
2
+
3
+ /**
4
+ * A utility method for calling the eslint package to run over a certain vue file.
5
+ * @param {string} eslintrc - the eslint configuration
6
+ * @param {string} vueFile - the vue file to run eslint over
7
+ */
8
+ export const execFileSyncEslintVueFiles = (eslintrc, vueFile) =>
9
+ execFileSync('pnpm', ['eslint', '--format=json', '-c', eslintrc, vueFile], {
10
+ encoding: 'utf8',
11
+ });