diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 011399de..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "eslint-config-ibexa/eslint" -} diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml index d90bda23..e2af25a3 100644 --- a/.github/workflows/frontend-ci.yaml +++ b/.github/workflows/frontend-ci.yaml @@ -2,10 +2,26 @@ name: Frontend build on: push: + paths: + - "**.cjs" + - "**.mjs" + - "**.js" + - "**.jsx" + - "**.ts" + - "**.tsx" + - "**.scss" branches: - main - '[0-9]+.[0-9]+' - pull_request: ~ + pull_request: + paths: + - "**.cjs" + - "**.mjs" + - "**.js" + - "**.jsx" + - "**.ts" + - "**.tsx" + - "**.scss" jobs: frontend-test: @@ -17,6 +33,6 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' - run: yarn install - run: yarn test diff --git a/.gitignore b/.gitignore index b816031e..1f459fd4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules/ yarn.lock /var +tsconfig.json diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..b14c02c7 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,5 @@ +import getIbexaConfig from '@ibexa/eslint-config/eslint'; + +export default [ + ...getIbexaConfig(), +]; diff --git a/ibexa.tsconfig.json b/ibexa.tsconfig.json new file mode 100644 index 00000000..ad45c073 --- /dev/null +++ b/ibexa.tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "@ibexa/ts-config", + "include": [ + "src/bundle/**/*.ts", + "src/bundle/**/*.tsx" + ] +} diff --git a/package.json b/package.json index 68dc7156..db72c031 100644 --- a/package.json +++ b/package.json @@ -3,18 +3,20 @@ "version": "1.0.0", "repository": "https://github.com/ezsystems/ezplatform-fieldtype-richtext.git", "private": true, - "prettier": "eslint-config-ibexa/prettier", + "prettier": "@ibexa/eslint-config/prettier", "dependencies": {}, "devDependencies": { - "eslint-config-ibexa": "https://github.com/ibexa/eslint-config-ibexa.git#~v1.2.0", - "@ibexa/ts-config": "https://github.com/ibexa/ts-config-ibexa#~v1.0.0", - "@types/react": "^18.3.11", - "@types/react-dom": "^18.3.1" + "@ibexa/eslint-config": "https://github.com/ibexa/eslint-config-ibexa.git#~v2.0.0", + "@ibexa/ts-config": "https://github.com/ibexa/ts-config-ibexa#~v1.1.0", + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.2" }, "scripts": { "test": "yarn prettier-test && yarn eslint-test", "fix": "yarn prettier-test --write && yarn eslint-test --fix", + "ts-test": "tsc --noEmit", "eslint-test": "eslint \"./src/bundle/Resources/**/*.{js,ts}\"", - "prettier-test": "yarn prettier \"./src/bundle/Resources/**/*.{js,ts,scss}\" --check" + "prettier-test": "yarn prettier \"./src/bundle/Resources/**/*.{js,ts,scss}\" --check", + "postinstall": "yarn ibexa-generate-tsconfig --use-root-project-tsconfig" } } diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index 508b1680..00000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "@ibexa/ts-config", - "include": ["src/bundle/**/*"] -}