@adyen/eslint-plugin-bento 2.0.0 → 2.0.1
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 +7 -0
- package/package.json +1 -1
- package/rules/deprecation-currency-default-slot/deprecation-currency-default-slot.integration.test.ts +2 -9
- package/rules/deprecation-tag-default-slot/deprecation-tag-default-slot.integration.test.ts +2 -9
- package/rules/vue-old-spacer-tokens/vue-old-spacer-tokens.integration.test.ts +2 -9
- package/utils/exec-file-sync-eslint-vue-files.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.1](https://github.com/Adyen/bento/compare/eslint-plugin-bento-v2.0.0...eslint-plugin-bento-v2.0.1) (2025-06-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Tests
|
|
7
|
+
|
|
8
|
+
* **eslint:** changed all integration tests to use `execFileSync` with arguments ([7b96e11](https://github.com/Adyen/bento/commit/7b96e11b17acafc3eb9b7a04c6d13c0eb2aea17e))
|
|
9
|
+
|
|
3
10
|
## [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
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -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
|
+
});
|