diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index d2d87a6..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -src/polyfills.ts diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..71bced8 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +### Description + +A brief overview of your completed or ongoing work. + +### Developement Checklist + +- [ ] Bump version up (`package.json` **and** `package-lock.json`) + +### Preview(s) + +- Add screenshots, gifs, videos, etc. here for a quick preview if applicable. diff --git a/.github/workflows/on-merge-main-deploy-gpr.yml b/.github/workflows/on-merge-main-deploy-gpr.yml index e73aa52..09de608 100644 --- a/.github/workflows/on-merge-main-deploy-gpr.yml +++ b/.github/workflows/on-merge-main-deploy-gpr.yml @@ -14,8 +14,8 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://npm.pkg.github.com' diff --git a/.github/workflows/on-merge-main-deploy-npmjs.yml b/.github/workflows/on-merge-main-deploy-npmjs.yml index d1b7884..bf8639a 100644 --- a/.github/workflows/on-merge-main-deploy-npmjs.yml +++ b/.github/workflows/on-merge-main-deploy-npmjs.yml @@ -10,8 +10,8 @@ jobs: deploy_npmjs_package: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/verify-pull-request.yml b/.github/workflows/verify-pull-request.yml index 2dc471e..7f2e145 100644 --- a/.github/workflows/verify-pull-request.yml +++ b/.github/workflows/verify-pull-request.yml @@ -4,7 +4,7 @@ jobs: verify_pull_request: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout 🛎️ run: npm ci diff --git a/README.md b/README.md index ad33a21..f65205c 100644 --- a/README.md +++ b/README.md @@ -152,16 +152,22 @@ Customization with optional inputs and icon ## Compatibility -| Angular version | @proangular/ngx-scroll-top | Status | -| --------------- | -------------------------- | ---------- | -| v19 | v19.0.0 | Compatible | -| v18 | ------ | Untested | -| v17 | ------ | Untested | -| v16 | ------ | Untested | -| v15 | ------ | Untested | -| v14 | v1.x.x | Compatible | -| v13 | v1.x.x | Compatible | -| v12 | v1.x.x | Compatible | +| <<<<<<< HEAD | Angular version | @proangular/ngx-scroll-top | Install | | +| ------------------------------------------- | --------------- | ----------------------------------------- | --------------- | ---------- | ---------- | ---------- | --- | ------ | -------- | --- | +| ------------------------------------------- | | v20 | v20.0.0 | +| `ng add @proangular/ngx-scroll-top@^20.0.0` | | v19 | v19.0.0 | +| `ng add @proangular/ngx-scroll-top@^19.0.0` | | v18 | ------ | Untested | | v17 | +| ------ | Untested | | v16 | ------ | Untested | | v15 | ------ | Untested | | +| v14 | v1.x.x | `ng add @proangular/ngx-scroll-top@1.1.8` | | v13 | v1.x.x | +| `ng add @proangular/ngx-scroll-top@1.1.8` | | v12 | v1.x.x | +| `ng add @proangular/ngx-scroll-top@1.1.8` | ======= | Angular version | +| @proangular/ngx-scroll-top | Status | | --------------- | +| -------------------------- | ---------- | | v19 | v19.0.0 | Compatible | | v18 | +| ------ | Untested | | v17 | ------ | Untested | | v16 | ------ | Untested | | +| v15 | ------ | Untested | | v14 | v1.x.x | Compatible | | v13 | v1.x.x | +| Compatible | | v12 | v1.x.x | Compatible | + +> > > > > > > main
[ Index ]
diff --git a/angular.json b/angular.json index d40e788..26f75c1 100644 --- a/angular.json +++ b/angular.json @@ -15,7 +15,7 @@ "prefix": "app", "architect": { "build": { - "builder": "@angular-devkit/build-angular:application", + "builder": "@angular/build:application", "options": { "outputPath": "dist/ngx-scroll-top", "index": "src/index.html", @@ -61,7 +61,7 @@ "defaultConfiguration": "production" }, "serve": { - "builder": "@angular-devkit/build-angular:dev-server", + "builder": "@angular/build:dev-server", "configurations": { "production": { "buildTarget": "ngx-scroll-top:build:production" @@ -73,10 +73,10 @@ "defaultConfiguration": "development" }, "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n" + "builder": "@angular/build:extract-i18n" }, "test": { - "builder": "@angular-devkit/build-angular:karma", + "builder": "@angular/build:karma", "options": { "polyfills": [ "zone.js", @@ -112,5 +112,31 @@ "schematicCollections": [ "@angular-eslint/schematics" ] + }, + "schematics": { + "@schematics/angular:component": { + "type": "component" + }, + "@schematics/angular:directive": { + "type": "directive" + }, + "@schematics/angular:service": { + "type": "service" + }, + "@schematics/angular:guard": { + "typeSeparator": "." + }, + "@schematics/angular:interceptor": { + "typeSeparator": "." + }, + "@schematics/angular:module": { + "typeSeparator": "." + }, + "@schematics/angular:pipe": { + "typeSeparator": "." + }, + "@schematics/angular:resolver": { + "typeSeparator": "." + } } } diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..2d740ad --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,224 @@ +// @ts-check +const eslint = require('@eslint/js'); +const tseslint = require('typescript-eslint'); +const angular = require('angular-eslint'); + +module.exports = tseslint.config( + { + files: ['**/*.ts'], + extends: [ + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...tseslint.configs.stylistic, + ...angular.configs.tsRecommended, + ], + processor: angular.processInlineTemplates, + rules: { + // Component selectors should follow given naming rules. + // @see http://codelyzer.com/rules/component-selector/ + '@angular-eslint/component-selector': [ + 'error', + { + type: 'element', + prefix: 'ngx', + style: 'kebab-case', + }, + ], + // Directive selectors should follow given naming rules. + // @see http://codelyzer.com/rules/directive-selector/ + '@angular-eslint/directive-selector': [ + 'error', + { + type: 'attribute', + prefix: 'ngx', + style: 'camelCase', + }, + ], + // Prefer to declare @Output as readonly since they are not supposed + // to be reassigned. + // @see http://codelyzer.com/rules/prefer-output-readonly/ + '@angular-eslint/prefer-output-readonly': ['error'], + // Enforce use of component selector rules. + // @see http://codelyzer.com/rules/component-selector/ + '@angular-eslint/use-component-selector': ['error'], + // Disallows using ViewEncapsulation.None. + // @see http://codelyzer.com/rules/use-component-view-encapsulation/ + '@angular-eslint/use-component-view-encapsulation': ['error'], + // Ensure that components implement life cycle interfaces if they use + // them. + // @see http://codelyzer.com/rules/use-life-cycle-interface/ + '@angular-eslint/use-lifecycle-interface': ['error'], + // Require consistently using either T[] or Array- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minimssy - veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip expir ea - commodo consequat. Duis aute irure dolor in reprehenderit in esselpa - voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteury sint - occaecat cupidatat non proident, sunt in culpa qui officia luretzo deserunt - mollit anim id est laborum. -
+ @for (_ of Array(88); track $index) { ++ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minimssy + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip expir ea + commodo consequat. Duis aute irure dolor in reprehenderit in esselpa + voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteury + sint occaecat cupidatat non proident, sunt in culpa qui officia luretzo + deserunt mollit anim id est laborum. +
+ }