Skip to content

Commit d106b7f

Browse files
Merge branch 'main' of github.com:storyblok/field-plugin
2 parents b39001d + 4279218 commit d106b7f

File tree

91 files changed

+3823
-4634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+3823
-4634
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@
6262
"bug",
6363
"code"
6464
]
65+
},
66+
{
67+
"login": "Dawntraoz",
68+
"name": "Alba Silvente Fuentes",
69+
"avatar_url": "https://avatars.githubusercontent.com/u/36744484?v=4",
70+
"profile": "https://links.dawntraoz.com/",
71+
"contributions": [
72+
"code"
73+
]
6574
}
6675
]
6776
}

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 132 deletions
This file was deleted.

.github/workflows/ci-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Lint
2222
run: |
2323
yarn eslint packages/field-plugin
24-
yarn workspaces foreach --include "helper-*" run lint
24+
yarn eslint packages/manifest-helper
2525
- name: Test
2626
run: |
2727
yarn workspace @storyblok/field-plugin test

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ For more details, please refer to the [documentation](https://www.storyblok.com/
2525
<td align="center" valign="top" width="16.66%"><a href="https://www.bendcircular.com"><img src="https://avatars.githubusercontent.com/u/2835032?v=4?s=100" width="100px;" alt="Philipp Litzenberger"/><br /><sub><b>Philipp Litzenberger</b></sub></a><br /><a href="#code-plitzenberger" title="Code">💻</a></td>
2626
<td align="center" valign="top" width="16.66%"><a href="https://hoera.dev"><img src="https://avatars.githubusercontent.com/u/14295796?v=4?s=100" width="100px;" alt="Samuel Höra"/><br /><sub><b>Samuel Höra</b></sub></a><br /><a href="#bug-hoersamu" title="Bug reports">🐛</a> <a href="#code-hoersamu" title="Code">💻</a></td>
2727
</tr>
28+
<tr>
29+
<td align="center" valign="top" width="16.66%"><a href="https://links.dawntraoz.com/"><img src="https://avatars.githubusercontent.com/u/36744484?v=4?s=100" width="100px;" alt="Alba Silvente Fuentes"/><br /><sub><b>Alba Silvente Fuentes</b></sub></a><br /><a href="#code-Dawntraoz" title="Code">💻</a></td>
30+
</tr>
2831
</tbody>
2932
</table>
3033

eslint.config.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import globals from 'globals'
2+
import eslintJs from '@eslint/js'
3+
import tsEslint from 'typescript-eslint'
4+
import prettier from 'eslint-config-prettier'
5+
import react from 'eslint-plugin-react'
6+
import vue from 'eslint-plugin-vue'
7+
import vueParser from 'vue-eslint-parser'
8+
import reactHooks from 'eslint-plugin-react-hooks'
9+
import reactRefresh from 'eslint-plugin-react-refresh'
10+
11+
export default [
12+
// Base configuration
13+
{
14+
ignores: ['**/node_modules/', '**/dist/'],
15+
},
16+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
17+
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
18+
prettier,
19+
eslintJs.configs.recommended,
20+
...tsEslint.configs.recommended,
21+
22+
// Vue.js configuration
23+
...vue.configs['flat/recommended'],
24+
{
25+
files: ['**/*.vue'],
26+
languageOptions: {
27+
parser: vueParser,
28+
parserOptions: {
29+
parser: tsEslint.parser,
30+
},
31+
},
32+
},
33+
34+
// React configuration
35+
react.configs.flat.recommended,
36+
react.configs.flat['jsx-runtime'],
37+
{
38+
plugins: {
39+
'react-hooks': reactHooks,
40+
'react-refresh': reactRefresh,
41+
},
42+
},
43+
44+
// Custom rules
45+
{
46+
rules: {
47+
'@typescript-eslint/no-unused-vars': [
48+
'error',
49+
{
50+
args: 'all',
51+
argsIgnorePattern: '^_',
52+
caughtErrors: 'all',
53+
caughtErrorsIgnorePattern: '^_',
54+
destructuredArrayIgnorePattern: '^_',
55+
varsIgnorePattern: '^_',
56+
ignoreRestSiblings: true,
57+
},
58+
],
59+
'react/prop-types': 'off',
60+
'vue/multi-word-component-names': 'off',
61+
},
62+
},
63+
]

jest.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@
99
},
1010
"private": true,
1111
"license": "UNLICENSED",
12-
"contributors": [
13-
{
14-
"name": "Johannes Lindgren",
15-
"email": "[email protected]",
16-
"url": "https://www.storyblok.com/"
17-
},
18-
{
19-
"name": "Bibiana Sebestianova",
20-
"email": "[email protected]",
21-
"url": "https://www.storyblok.com/"
22-
}
23-
],
2412
"workspaces": [
2513
"packages/*",
2614
"packages/cli/templates/*",
@@ -60,26 +48,26 @@
6048
"bump-version": "./scripts/bump-version.ts"
6149
},
6250
"devDependencies": {
51+
"@eslint/js": "9.11.0",
6352
"@storyblok/mui": "0.2.0",
64-
"@types/jest": "29.5.12",
6553
"@types/node": "18.19.17",
66-
"@typescript-eslint/eslint-plugin": "^5.30.7",
67-
"@typescript-eslint/parser": "^5.30.7",
68-
"eslint": "8.56.0",
69-
"eslint-config-prettier": "^8.5.0",
70-
"eslint-plugin-functional": "^4.2.2",
71-
"eslint-plugin-prettier": "^5.1.3",
72-
"jest": "29.7.0",
73-
"jest-environment-jsdom": "29.7.0",
54+
"eslint": "9.11.0",
55+
"eslint-config-prettier": "9.1.0",
56+
"eslint-plugin-react": "7.36.1",
57+
"eslint-plugin-react-hooks": "4.6.2",
58+
"eslint-plugin-react-refresh": "0.4.12",
59+
"eslint-plugin-vue": "9.28.0",
60+
"globals": "15.9.0",
7461
"kleur": "4.1.5",
7562
"prettier": "^3.2.5",
7663
"prompts": "2.4.2",
7764
"semver": "7.6.0",
78-
"ts-jest": "29.1.2",
7965
"tsx": "3.14.0",
8066
"typescript": "^5.3.3",
67+
"typescript-eslint": "8.6.0",
8168
"vite": "5.1.3",
8269
"vite-plugin-dts": "1.7.3",
70+
"vue-eslint-parser": "9.4.3",
8371
"zx": "7.2.3"
8472
}
8573
}

packages/cli/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storyblok/field-plugin-cli",
3-
"version": "1.1.2",
3+
"version": "1.2.1",
44
"type": "module",
55
"bin": {
66
"field-plugin": "./bin.js"
@@ -36,10 +36,11 @@
3636
"walkdir": "^0.4.1"
3737
},
3838
"devDependencies": {
39+
"@storyblok/manifest-helper": "workspace:*",
3940
"@types/execa": "2.0.0",
4041
"@types/fs-extra": "11.0.4",
4142
"@types/prompts": "2.4.9",
4243
"temp-dir": "3.0.0",
43-
"vitest": "1.3.0"
44+
"vitest": "2.1.1"
4445
}
4546
}

packages/cli/src/__tests__/utils.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ describe('utils', () => {
5757
describe('dotEnvPath is given', () => {
5858
it('returns error if env file does not have token', async () => {
5959
vi.mocked(existsSync).mockImplementation(() => true)
60-
// eslint-disable-next-line functional/immutable-data
6160
delete process.env.STORYBLOK_PERSONAL_ACCESS_TOKEN
6261
const result = await getPersonalAccessToken({
6362
token: undefined,
@@ -74,7 +73,6 @@ describe('utils', () => {
7473

7574
it('returns token if env file has token', async () => {
7675
vi.mocked(existsSync).mockImplementation(() => true)
77-
// eslint-disable-next-line functional/immutable-data
7876
process.env.STORYBLOK_PERSONAL_ACCESS_TOKEN = 'my-token'
7977
const result = await getPersonalAccessToken({
8078
token: undefined,
@@ -90,7 +88,6 @@ describe('utils', () => {
9088
describe('dotEnvPath is not given', () => {
9189
it('returns error if env files do not have token', async () => {
9290
vi.mocked(existsSync).mockImplementation(() => true)
93-
// eslint-disable-next-line functional/immutable-data
9491
delete process.env.STORYBLOK_PERSONAL_ACCESS_TOKEN
9592
const result = await getPersonalAccessToken({
9693
token: undefined,
@@ -108,7 +105,6 @@ describe('utils', () => {
108105

109106
it('returns token if env files have token', async () => {
110107
vi.mocked(existsSync).mockImplementation(() => true)
111-
// eslint-disable-next-line functional/immutable-data
112108
process.env.STORYBLOK_PERSONAL_ACCESS_TOKEN = 'my-token'
113109
const result = await getPersonalAccessToken({
114110
token: undefined,

0 commit comments

Comments
 (0)