diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index ef9bcb1..0000000 --- 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 92f58f3..7303e53 100644 --- a/.github/workflows/frontend-ci.yaml +++ b/.github/workflows/frontend-ci.yaml @@ -3,14 +3,24 @@ name: Frontend build on: push: paths: + - "**.cjs" + - "**.mjs" - "**.js" + - "**.jsx" + - "**.ts" + - "**.tsx" - "**.scss" branches: - main - '[0-9]+.[0-9]+' pull_request: paths: + - "**.cjs" + - "**.mjs" - "**.js" + - "**.jsx" + - "**.ts" + - "**.tsx" - "**.scss" jobs: @@ -23,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 4ac5e75..591fb39 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /vendor /yarn.lock /var +tsconfig.json diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..b14c02c --- /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 0000000..ad45c07 --- /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 e334b02..fc0ac98 100644 --- a/package.json +++ b/package.json @@ -2,18 +2,20 @@ "name": "notifications", "repository": "git@github.com:ibexa/notifications.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 508b168..0000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "@ibexa/ts-config", - "include": ["src/bundle/**/*"] -}